Package org.apache.unomi.router.rest
Class AbstractConfigurationServiceEndpoint<T>
- java.lang.Object
-
- org.apache.unomi.router.rest.AbstractConfigurationServiceEndpoint<T>
-
- Direct Known Subclasses:
ExportConfigurationServiceEndPoint
,ImportConfigurationServiceEndPoint
public abstract class AbstractConfigurationServiceEndpoint<T> extends Object
Created by amidani on 26/06/2017.
-
-
Field Summary
Fields Modifier and Type Field Description protected ImportExportConfigurationService<T>
configurationService
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationServiceEndpoint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
deleteConfiguration(String configId)
Delete a configuration by id.T
getConfiguration(String configId)
Retrieves a configuration by id.List<T>
getConfigurations()
Retrieves all the configurations.abstract T
saveConfiguration(T configuration)
-
-
-
Field Detail
-
configurationService
protected ImportExportConfigurationService<T> configurationService
-
-
Method Detail
-
getConfigurations
@GET @Path("/") @Produces("application/json") @Consumes("application/json") public List<T> getConfigurations()
Retrieves all the configurations.- Returns:
- all the configurations.
-
saveConfiguration
@POST @Path("/") @Produces("application/json") @Consumes("application/json") public abstract T saveConfiguration(T configuration)
-
getConfiguration
@GET @Path("/{configId}") @Produces("application/json") @Consumes("application/json") public T getConfiguration(@PathParam("configId") String configId)
Retrieves a configuration by id.- Parameters:
configId
- config id- Returns:
- the configuration that matches the given id.
-
deleteConfiguration
@DELETE @Path("/{configId}") @Produces("application/json") @Consumes("application/json") public abstract void deleteConfiguration(@PathParam("configId") String configId)
Delete a configuration by id.- Parameters:
configId
- config id
-
-