Package org.apache.syncope.core.logic
Class TaskLogic
- java.lang.Object
-
- org.apache.syncope.core.logic.AbstractLogic<T>
-
- org.apache.syncope.core.logic.AbstractTransactionalLogic<T>
-
- org.apache.syncope.core.logic.AbstractExecutableLogic<TaskTO>
-
- org.apache.syncope.core.logic.TaskLogic
-
public class TaskLogic extends AbstractExecutableLogic<TaskTO>
-
-
Field Summary
Fields Modifier and Type Field Description protected TaskDataBinderbinderprotected JobManagerjobManagerprotected JobStatusDAOjobStatusDAOprotected NotificationDAOnotificationDAOprotected NotificationJobDelegatenotificationJobDelegateprotected ExternalResourceDAOresourceDAOprotected SchedulerFactoryBeanschedulerprotected TaskDAOtaskDAOprotected TaskExecDAOtaskExecDAOprotected PropagationTaskExecutortaskExecutorprotected TaskUtilsFactorytaskUtilsFactory-
Fields inherited from class org.apache.syncope.core.logic.AbstractLogic
LOG
-
-
Constructor Summary
Constructors Constructor Description TaskLogic(JobManager jobManager, SchedulerFactoryBean scheduler, JobStatusDAO jobStatusDAO, TaskDAO taskDAO, TaskExecDAO taskExecDAO, ExternalResourceDAO resourceDAO, NotificationDAO notificationDAO, TaskDataBinder binder, PropagationTaskExecutor taskExecutor, NotificationJobDelegate notificationJobDelegate, TaskUtilsFactory taskUtilsFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionJob(String key, JobAction action)<T extends SchedTaskTO>
TcreateSchedTask(TaskType type, T taskTO)<T extends TaskTO>
Tdelete(TaskType type, String key)ExecTOdeleteExecution(String execKey)List<BatchResponseItem>deleteExecutions(String key, OffsetDateTime before, OffsetDateTime after)protected voiddoActionJob(org.quartz.JobKey jobKey, JobAction action)protected ExecTOdoExecute(Task<?> task, OffsetDateTime startAt, Map<String,Object> additionalDataMap)protected List<JobTO>doListJobs(boolean includeCustom)ExecTOexecute(ExecSpecs specs)ExecTOexecute(ExecSpecs specs, SyncopeForm macroTaskForm)JobTOgetJob(String key)protected JobTOgetJobTO(org.quartz.JobKey jobKey, boolean includeCustom)SyncopeFormgetMacroTaskForm(String key, Locale locale)protected Triple<JobType,String,String>getReference(org.quartz.JobKey jobKey)Pair<Integer,List<ExecTO>>listExecutions(String key, OffsetDateTime before, OffsetDateTime after, int page, int size, List<OrderByClause> orderByClauses)List<JobTO>listJobs()List<ExecTO>listRecentExecutions(int max)List<PropagationTaskTO>purgePropagations(OffsetDateTime since, List<ExecStatus> statuses, List<String> resources)<T extends TaskTO>
Tread(TaskType type, String key, boolean details)protected TaskTOresolveReference(Method method, Object... args)<T extends TaskTO>
Pair<Integer,List<T>>search(TaskType type, String resource, String notification, AnyTypeKind anyTypeKind, String entityKey, int page, int size, List<OrderByClause> orderByClauses, boolean details)protected voidsecurityChecks(String entitlement, String realm)<T extends SchedTaskTO>
TupdateSchedTask(TaskType type, SchedTaskTO taskTO)-
Methods inherited from class org.apache.syncope.core.logic.AbstractLogic
resolveBeanReference
-
-
-
-
Field Detail
-
taskDAO
protected final TaskDAO taskDAO
-
taskExecDAO
protected final TaskExecDAO taskExecDAO
-
resourceDAO
protected final ExternalResourceDAO resourceDAO
-
notificationDAO
protected final NotificationDAO notificationDAO
-
binder
protected final TaskDataBinder binder
-
taskExecutor
protected final PropagationTaskExecutor taskExecutor
-
notificationJobDelegate
protected final NotificationJobDelegate notificationJobDelegate
-
taskUtilsFactory
protected final TaskUtilsFactory taskUtilsFactory
-
jobManager
protected final JobManager jobManager
-
scheduler
protected final SchedulerFactoryBean scheduler
-
jobStatusDAO
protected final JobStatusDAO jobStatusDAO
-
-
Constructor Detail
-
TaskLogic
public TaskLogic(JobManager jobManager, SchedulerFactoryBean scheduler, JobStatusDAO jobStatusDAO, TaskDAO taskDAO, TaskExecDAO taskExecDAO, ExternalResourceDAO resourceDAO, NotificationDAO notificationDAO, TaskDataBinder binder, PropagationTaskExecutor taskExecutor, NotificationJobDelegate notificationJobDelegate, TaskUtilsFactory taskUtilsFactory)
-
-
Method Detail
-
createSchedTask
@PreAuthorize("hasRole(\'TASK_CREATE\')") public <T extends SchedTaskTO> T createSchedTask(TaskType type, T taskTO)
-
updateSchedTask
@PreAuthorize("hasRole(\'TASK_UPDATE\')") public <T extends SchedTaskTO> T updateSchedTask(TaskType type, SchedTaskTO taskTO)
-
search
@PreAuthorize("hasRole(\'TASK_LIST\')") @Transactional(readOnly=true) public <T extends TaskTO> Pair<Integer,List<T>> search(TaskType type, String resource, String notification, AnyTypeKind anyTypeKind, String entityKey, int page, int size, List<OrderByClause> orderByClauses, boolean details)
-
read
@PreAuthorize("hasRole(\'TASK_READ\')") @Transactional(readOnly=true) public <T extends TaskTO> T read(TaskType type, String key, boolean details)
-
getMacroTaskForm
@PreAuthorize("hasRole(\'TASK_READ\')") @Transactional(readOnly=true) public SyncopeForm getMacroTaskForm(String key, Locale locale)
-
doExecute
protected ExecTO doExecute(Task<?> task, OffsetDateTime startAt, Map<String,Object> additionalDataMap)
-
execute
@PreAuthorize("hasRole(\'TASK_EXECUTE\')") public ExecTO execute(ExecSpecs specs)
- Specified by:
executein classAbstractExecutableLogic<TaskTO>
-
execute
@PreAuthorize("hasRole(\'TASK_EXECUTE\')") public ExecTO execute(ExecSpecs specs, SyncopeForm macroTaskForm)
-
delete
@PreAuthorize("hasRole(\'TASK_DELETE\')") public <T extends TaskTO> T delete(TaskType type, String key)
-
listExecutions
@PreAuthorize("hasRole(\'TASK_READ\')") public Pair<Integer,List<ExecTO>> listExecutions(String key, OffsetDateTime before, OffsetDateTime after, int page, int size, List<OrderByClause> orderByClauses)
- Specified by:
listExecutionsin classAbstractExecutableLogic<TaskTO>
-
listRecentExecutions
@PreAuthorize("hasRole(\'TASK_LIST\')") public List<ExecTO> listRecentExecutions(int max)
- Specified by:
listRecentExecutionsin classAbstractExecutableLogic<TaskTO>
-
deleteExecution
@PreAuthorize("hasRole(\'TASK_DELETE\')") public ExecTO deleteExecution(String execKey)
- Specified by:
deleteExecutionin classAbstractExecutableLogic<TaskTO>
-
deleteExecutions
@PreAuthorize("hasRole(\'TASK_DELETE\')") public List<BatchResponseItem> deleteExecutions(String key, OffsetDateTime before, OffsetDateTime after)
- Specified by:
deleteExecutionsin classAbstractExecutableLogic<TaskTO>
-
listJobs
@PreAuthorize("hasRole(\'TASK_LIST\')") public List<JobTO> listJobs()
- Specified by:
listJobsin classAbstractExecutableLogic<TaskTO>
-
getJob
@PreAuthorize("hasRole(\'TASK_READ\')") public JobTO getJob(String key)
- Specified by:
getJobin classAbstractExecutableLogic<TaskTO>
-
actionJob
@PreAuthorize("hasRole(\'TASK_EXECUTE\')") public void actionJob(String key, JobAction action)
- Specified by:
actionJobin classAbstractExecutableLogic<TaskTO>
-
purgePropagations
@PreAuthorize("hasRole(\'TASK_DELETE\')") public List<PropagationTaskTO> purgePropagations(OffsetDateTime since, List<ExecStatus> statuses, List<String> resources)
-
resolveReference
protected TaskTO resolveReference(Method method, Object... args) throws UnresolvedReferenceException
- Specified by:
resolveReferencein classAbstractLogic<TaskTO>- Throws:
UnresolvedReferenceException
-
getJobTO
protected JobTO getJobTO(org.quartz.JobKey jobKey, boolean includeCustom) throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
-
doActionJob
protected void doActionJob(org.quartz.JobKey jobKey, JobAction action)
-
-