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 TaskDataBinder
binder
protected JobManager
jobManager
protected JobStatusDAO
jobStatusDAO
protected NotificationDAO
notificationDAO
protected NotificationJobDelegate
notificationJobDelegate
protected ExternalResourceDAO
resourceDAO
protected SchedulerFactoryBean
scheduler
protected TaskDAO
taskDAO
protected TaskExecDAO
taskExecDAO
protected PropagationTaskExecutor
taskExecutor
protected TaskUtilsFactory
taskUtilsFactory
-
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 void
actionJob(String key, JobAction action)
<T extends SchedTaskTO>
TcreateSchedTask(TaskType type, T taskTO)
<T extends TaskTO>
Tdelete(TaskType type, String key)
ExecTO
deleteExecution(String execKey)
List<BatchResponseItem>
deleteExecutions(String key, OffsetDateTime before, OffsetDateTime after)
protected void
doActionJob(org.quartz.JobKey jobKey, JobAction action)
protected ExecTO
doExecute(Task<?> task, OffsetDateTime startAt, Map<String,Object> additionalDataMap)
protected List<JobTO>
doListJobs(boolean includeCustom)
ExecTO
execute(ExecSpecs specs)
ExecTO
execute(ExecSpecs specs, SyncopeForm macroTaskForm)
JobTO
getJob(String key)
protected JobTO
getJobTO(org.quartz.JobKey jobKey, boolean includeCustom)
SyncopeForm
getMacroTaskForm(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 TaskTO
resolveReference(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 void
securityChecks(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:
execute
in 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:
listExecutions
in classAbstractExecutableLogic<TaskTO>
-
listRecentExecutions
@PreAuthorize("hasRole(\'TASK_LIST\')") public List<ExecTO> listRecentExecutions(int max)
- Specified by:
listRecentExecutions
in classAbstractExecutableLogic<TaskTO>
-
deleteExecution
@PreAuthorize("hasRole(\'TASK_DELETE\')") public ExecTO deleteExecution(String execKey)
- Specified by:
deleteExecution
in classAbstractExecutableLogic<TaskTO>
-
deleteExecutions
@PreAuthorize("hasRole(\'TASK_DELETE\')") public List<BatchResponseItem> deleteExecutions(String key, OffsetDateTime before, OffsetDateTime after)
- Specified by:
deleteExecutions
in classAbstractExecutableLogic<TaskTO>
-
listJobs
@PreAuthorize("hasRole(\'TASK_LIST\')") public List<JobTO> listJobs()
- Specified by:
listJobs
in classAbstractExecutableLogic<TaskTO>
-
getJob
@PreAuthorize("hasRole(\'TASK_READ\')") public JobTO getJob(String key)
- Specified by:
getJob
in classAbstractExecutableLogic<TaskTO>
-
actionJob
@PreAuthorize("hasRole(\'TASK_EXECUTE\')") public void actionJob(String key, JobAction action)
- Specified by:
actionJob
in 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:
resolveReference
in 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)
-
-