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 TaskLogiclogic-
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.Responsecreate(TaskType type, SchedTaskTO taskTO)Creates a new task.voiddelete(TaskType type, String key)Deletes the task matching the provided key.ExecTOexecute(ExecSpecs specs, SyncopeForm macroTaskForm)Executes the macro task matching the given specs, with the provided form as input.protected AbstractExecutableLogic<?>getExecutableLogic()SyncopeFormgetMacroTaskForm(String key, String locale)Fetches the form to fill and submit for execution, for the given macro task (if defined).javax.ws.rs.core.ResponsepurgePropagations(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.voidupdate(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:
getExecutableLogicin classAbstractExecutableService
-
create
public javax.ws.rs.core.Response create(TaskType type, SchedTaskTO taskTO)
Description copied from interface:TaskServiceCreates a new task.- Specified by:
createin 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:TaskServiceDeletes the task matching the provided key.- Specified by:
deletein 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:TaskServiceReturns a paged list of existing tasks matching the given query.- Specified by:
searchin 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:TaskServiceReturns the task matching the given key.- Specified by:
readin 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
public void update(TaskType type, SchedTaskTO taskTO)
Description copied from interface:TaskServiceUpdates the task matching the provided key.- Specified by:
updatein 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:TaskServiceDeletes all the propagation tasks whose latest execution is matching the given conditions. At least one matching condition must be specified.- Specified by:
purgePropagationsin interfaceTaskService- Parameters:
since- match all executions started afterwardsstatuses- execution status(es) to matchresources- external resource(s) to match- Returns:
- deleted propagation tasks
-
getMacroTaskForm
public SyncopeForm getMacroTaskForm(String key, String locale)
Description copied from interface:TaskServiceFetches the form to fill and submit for execution, for the given macro task (if defined).- Specified by:
getMacroTaskFormin 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
public ExecTO execute(ExecSpecs specs, SyncopeForm macroTaskForm)
Description copied from interface:TaskServiceExecutes the macro task matching the given specs, with the provided form as input.- Specified by:
executein interfaceTaskService- Parameters:
specs- conditions to execmacroTaskForm- macro task form- Returns:
- execution report for the macro task matching the given specs
-
-