Package org.apache.unomi.router.rest
Class ImportConfigurationServiceEndPoint
- java.lang.Object
-
- org.apache.unomi.router.rest.AbstractConfigurationServiceEndpoint<ImportConfiguration>
-
- org.apache.unomi.router.rest.ImportConfigurationServiceEndPoint
-
@Path("/importConfiguration") public class ImportConfigurationServiceEndPoint extends AbstractConfigurationServiceEndpoint<ImportConfiguration>
A JAX-RS endpoint to manageImportConfiguration
s.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigSharingService
configSharingService
-
Fields inherited from class org.apache.unomi.router.rest.AbstractConfigurationServiceEndpoint
configurationService
-
-
Constructor Summary
Constructors Constructor Description ImportConfigurationServiceEndPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteConfiguration(String configId)
Delete a configuration by id.javax.ws.rs.core.Response
processOneshotImportConfigurationCSV(String importConfigId, org.apache.cxf.jaxrs.ext.multipart.Attachment file)
Save/Update the given import configuration.ImportConfiguration
saveConfiguration(ImportConfiguration importConfiguration)
Save the given import configuration.void
setConfigSharingService(ConfigSharingService configSharingService)
void
setImportConfigurationService(ImportExportConfigurationService<ImportConfiguration> importConfigurationService)
-
Methods inherited from class org.apache.unomi.router.rest.AbstractConfigurationServiceEndpoint
getConfiguration, getConfigurations
-
-
-
-
Field Detail
-
configSharingService
protected ConfigSharingService configSharingService
-
-
Constructor Detail
-
ImportConfigurationServiceEndPoint
public ImportConfigurationServiceEndPoint() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException
-
-
Method Detail
-
setConfigSharingService
public void setConfigSharingService(ConfigSharingService configSharingService)
-
setImportConfigurationService
public void setImportConfigurationService(ImportExportConfigurationService<ImportConfiguration> importConfigurationService)
-
saveConfiguration
public ImportConfiguration saveConfiguration(ImportConfiguration importConfiguration)
Save the given import configuration.- Specified by:
saveConfiguration
in classAbstractConfigurationServiceEndpoint<ImportConfiguration>
- Returns:
- the import configuration saved.
-
deleteConfiguration
public void deleteConfiguration(String configId)
Description copied from class:AbstractConfigurationServiceEndpoint
Delete a configuration by id.- Specified by:
deleteConfiguration
in classAbstractConfigurationServiceEndpoint<ImportConfiguration>
- Parameters:
configId
- config id
-
processOneshotImportConfigurationCSV
@POST @Path("/oneshot") @Consumes("multipart/form-data") @Produces("application/json") public javax.ws.rs.core.Response processOneshotImportConfigurationCSV(@NotNull @Pattern(regexp="^[a-zA-Z0-9_.\\-]{1,255}$") String importConfigId, org.apache.cxf.jaxrs.ext.multipart.Attachment file)
Save/Update the given import configuration. Prepare the file to be processed with Camel routes- Parameters:
file
- fileimportConfigId
- config- Returns:
- OK / NOK Http Code.
-
-