Class AbstractEntityServices<T extends step.core.accessors.AbstractIdentifiableObject>
- java.lang.Object
-
- step.framework.server.AbstractServices<User>
-
- step.core.deployment.AbstractStepServices
-
- step.controller.services.entities.AbstractEntityServices<T>
-
- Direct Known Subclasses:
AbtractFunctionServices
,ParameterServices
,PlanServices
,SchedulerServices
public abstract class AbstractEntityServices<T extends step.core.accessors.AbstractIdentifiableObject> extends AbstractStepServices
-
-
Field Summary
-
Fields inherited from class step.core.deployment.AbstractStepServices
configuration, SESSION
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityServices(String entityName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected T
beforeSave(T entity)
AsyncTaskStatus<BulkOperationReport>
bulkDelete(BulkOperationParameters parameters)
T
clone(String id)
AsyncTaskStatus<BulkOperationReport>
cloneEntities(BulkOperationParameters parameters)
protected T
cloneEntity(T entity)
void
delete(String id)
List<T>
findManyByAttributes(Map<String,String> attributes)
T
get(String id)
protected step.framework.server.Session<User>
getSession()
void
init()
step.framework.server.tables.service.TableResponse<T>
request(step.framework.server.tables.service.TableRequest request)
T
save(T entity)
static void
setCurrentSession(step.framework.server.Session<User> session)
Set the currentSession
for the current thread.-
Methods inherited from class step.core.deployment.AbstractStepServices
getContext, getExecutionRunnable, getObjectEnricher, getObjectFilter, getScheduler
-
-
-
-
Constructor Detail
-
AbstractEntityServices
public AbstractEntityServices(String entityName)
-
-
Method Detail
-
init
@PostConstruct public void init() throws Exception
- Overrides:
init
in classAbstractStepServices
- Throws:
Exception
-
setCurrentSession
public static void setCurrentSession(step.framework.server.Session<User> session)
Set the currentSession
for the current thread. This is useful for request that are processed outside the Jetty scope like forBulkOperationManager
- Parameters:
session
- the currentSession
-
getSession
protected step.framework.server.Session<User> getSession()
- Overrides:
getSession
in classstep.framework.server.AbstractServices<User>
-
findManyByAttributes
@POST @Path("/find") @Produces("application/json") @Consumes("application/json") public List<T> findManyByAttributes(Map<String,String> attributes)
-
delete
@DELETE @Path("/{id}") public void delete(@PathParam("id") String id)
-
cloneEntities
@POST @Path("/bulk/clone") @Consumes("application/json") public AsyncTaskStatus<BulkOperationReport> cloneEntities(BulkOperationParameters parameters)
-
clone
@GET @Path("/{id}/clone") @Produces("application/json") public T clone(@PathParam("id") String id)
-
bulkDelete
@POST @Path("/bulk/delete") @Consumes("application/json") public AsyncTaskStatus<BulkOperationReport> bulkDelete(BulkOperationParameters parameters)
-
request
@POST @Path("/table") @Consumes("application/json") @Produces("application/json") public step.framework.server.tables.service.TableResponse<T> request(step.framework.server.tables.service.TableRequest request) throws step.framework.server.tables.service.TableServiceException
- Throws:
step.framework.server.tables.service.TableServiceException
-
-