Class TaskServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.AbstractExecutableService
-
- org.apache.syncope.core.rest.cxf.service.TaskServiceImpl
-
- All Implemented Interfaces:
ExecutableService
,JAXRSService
,TaskService
@Service public class TaskServiceImpl extends AbstractExecutableService implements TaskService
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskLogic
logic
-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description TaskServiceImpl(TaskLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
create(TaskType type, SchedTaskTO taskTO)
Creates a new task.void
delete(TaskType type, String key)
Deletes the task matching the provided key.protected AbstractExecutableLogic<?>
getExecutableLogic()
javax.ws.rs.core.Response
purgePropagations(OffsetDateTime since, List<ExecStatus> statuses, List<String> resources)
Deletes all the propagation tasks whose latest execution is matching the given conditions.<T extends TaskTO>
Tread(TaskType type, String key, boolean details)
Returns the task matching the given key.<T extends TaskTO>
PagedResult<T>search(TaskQuery query)
Returns a paged list of existing tasks matching the given query.void
update(TaskType type, SchedTaskTO taskTO)
Updates the task matching the provided key.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractExecutableService
actionJob, deleteExecution, deleteExecutions, execute, getJob, listExecutions, listJobs, listRecentExecutions
-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.common.rest.api.service.ExecutableService
actionJob, deleteExecution, deleteExecutions, execute, getJob, listExecutions, listJobs, listRecentExecutions
-
-
-
-
Field Detail
-
logic
protected final TaskLogic logic
-
-
Constructor Detail
-
TaskServiceImpl
public TaskServiceImpl(TaskLogic logic)
-
-
Method Detail
-
getExecutableLogic
protected AbstractExecutableLogic<?> getExecutableLogic()
- Specified by:
getExecutableLogic
in classAbstractExecutableService
-
create
public javax.ws.rs.core.Response create(TaskType type, SchedTaskTO taskTO)
Description copied from interface:TaskService
Creates a new task.- Specified by:
create
in interfaceTaskService
- Parameters:
type
- task typetaskTO
- task to be created- Returns:
- Response object featuring Location header of created task
-
delete
public void delete(TaskType type, String key)
Description copied from interface:TaskService
Deletes the task matching the provided key.- Specified by:
delete
in interfaceTaskService
- Parameters:
type
- task typekey
- key of task to be deleted
-
search
public <T extends TaskTO> PagedResult<T> search(TaskQuery query)
Description copied from interface:TaskService
Returns a paged list of existing tasks matching the given query.- Specified by:
search
in interfaceTaskService
- Type Parameters:
T
- type of taskTO- Parameters:
query
- query conditions- Returns:
- paged list of existing tasks matching the given query
-
read
public <T extends TaskTO> T read(TaskType type, String key, boolean details)
Description copied from interface:TaskService
Returns the task matching the given key.- Specified by:
read
in interfaceTaskService
- Type Parameters:
T
- type of taskTO- Parameters:
type
- task typekey
- key of task to be readdetails
- whether include executions or not, defaults to true- Returns:
- task with matching id
-
update
public void update(TaskType type, SchedTaskTO taskTO)
Description copied from interface:TaskService
Updates the task matching the provided key.- Specified by:
update
in interfaceTaskService
- Parameters:
type
- task typetaskTO
- updated task to be stored
-
purgePropagations
public javax.ws.rs.core.Response purgePropagations(OffsetDateTime since, List<ExecStatus> statuses, List<String> resources)
Description copied from interface:TaskService
Deletes all the propagation tasks whose latest execution is matching the given conditions. At least one matching condition must be specified.- Specified by:
purgePropagations
in interfaceTaskService
- Parameters:
since
- match all executions started afterwardsstatuses
- execution status(es) to matchresources
- external resource(s) to match- Returns:
- deleted propagation tasks
-
-