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
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(TaskType type, SchedTaskTO taskTO) Creates a new task.void
Deletes the task matching the provided key.execute
(ExecSpecs specs, SyncopeForm macroTaskForm) Executes the macro task matching the given specs, with the provided form as input.protected AbstractExecutableLogic
<?> getMacroTaskForm
(String key, String locale) Fetches the form to fill and submit for execution, for the given macro task (if defined).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>
TReturns the task matching the given key.<T extends TaskTO>
PagedResult<T> 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, getPreference, isNullPriorityAsync, modificationResponse, pageable, pageable, sort
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 Details
-
logic
-
-
Constructor Details
-
TaskServiceImpl
-
-
Method Details
-
getExecutableLogic
- Specified by:
getExecutableLogic
in classAbstractExecutableService
-
create
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
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
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
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 key
-
update
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 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
-
getMacroTaskForm
Description copied from interface:TaskService
Fetches the form to fill and submit for execution, for the given macro task (if defined).- Specified by:
getMacroTaskForm
in interfaceTaskService
- Parameters:
key
- macro task keylocale
- form locale- Returns:
- the form to fill and submit for execution, for the given macro task (if defined)
-
execute
Description copied from interface:TaskService
Executes the macro task matching the given specs, with the provided form as input.- Specified by:
execute
in interfaceTaskService
- Parameters:
specs
- conditions to execmacroTaskForm
- macro task form- Returns:
- execution report for the macro task matching the given specs
-