@Component public class TaskLogic extends AbstractExecutableLogic<TaskTO>
Modifier and Type | Field and Description |
---|---|
protected JobManager |
jobManager |
protected JobStatusDAO |
jobStatusDAO |
protected static org.slf4j.Logger |
LOG |
protected SchedulerFactoryBean |
scheduler |
Constructor and Description |
---|
TaskLogic() |
Modifier and Type | Method and Description |
---|---|
void |
actionJob(String key,
JobAction action) |
<T extends SchedTaskTO> |
createSchedTask(TaskType type,
T taskTO) |
<T extends TaskTO> |
delete(TaskType type,
String key) |
ExecTO |
deleteExecution(String execKey) |
List<BatchResponseItem> |
deleteExecutions(String key,
Date before,
Date after) |
protected void |
doActionJob(org.quartz.JobKey jobKey,
JobAction action) |
protected List<JobTO> |
doListJobs(boolean includeCustom) |
ExecTO |
execute(String key,
Date startAt,
boolean dryRun) |
JobTO |
getJob(String key) |
protected JobTO |
getJobTO(org.quartz.JobKey jobKey,
boolean includeCustom) |
protected Triple<JobType,String,String> |
getReference(org.quartz.JobKey jobKey) |
Pair<Integer,List<ExecTO>> |
listExecutions(String key,
Date before,
Date after,
int page,
int size,
List<OrderByClause> orderByClauses) |
List<JobTO> |
listJobs() |
List<ExecTO> |
listRecentExecutions(int max) |
List<PropagationTaskTO> |
purgePropagations(Date since,
List<ExecStatus> statuses,
List<String> resources) |
<T extends TaskTO> |
read(TaskType type,
String key,
boolean details) |
T |
resolveBeanReference(Method method,
Object... args)
Resolves stored bean (if existing) referred by the given CUD method.
|
protected TaskTO |
resolveReference(Method method,
Object... args) |
<T extends TaskTO> |
search(TaskType type,
String resource,
String notification,
AnyTypeKind anyTypeKind,
String entityKey,
int page,
int size,
List<OrderByClause> orderByClauses,
boolean details) |
<T extends SchedTaskTO> |
updateSchedTask(TaskType type,
SchedTaskTO taskTO) |
@Autowired protected JobManager jobManager
@Autowired protected SchedulerFactoryBean scheduler
@Autowired protected JobStatusDAO jobStatusDAO
protected static final org.slf4j.Logger LOG
@PreAuthorize(value="hasRole(\'TASK_CREATE\')") public <T extends SchedTaskTO> T createSchedTask(TaskType type, T taskTO)
@PreAuthorize(value="hasRole(\'TASK_UPDATE\')") public <T extends SchedTaskTO> T updateSchedTask(TaskType type, SchedTaskTO taskTO)
@PreAuthorize(value="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)
@PreAuthorize(value="hasRole(\'TASK_READ\')") @Transactional(readOnly=true) public <T extends TaskTO> T read(TaskType type, String key, boolean details)
@PreAuthorize(value="hasRole(\'TASK_EXECUTE\')") public ExecTO execute(String key, Date startAt, boolean dryRun)
execute
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_DELETE\')") public <T extends TaskTO> T delete(TaskType type, String key)
@PreAuthorize(value="hasRole(\'TASK_READ\')") public Pair<Integer,List<ExecTO>> listExecutions(String key, Date before, Date after, int page, int size, List<OrderByClause> orderByClauses)
listExecutions
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_LIST\')") public List<ExecTO> listRecentExecutions(int max)
listRecentExecutions
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_DELETE\')") public ExecTO deleteExecution(String execKey)
deleteExecution
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_DELETE\')") public List<BatchResponseItem> deleteExecutions(String key, Date before, Date after)
deleteExecutions
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_LIST\')") public List<JobTO> listJobs()
listJobs
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_READ\')") public JobTO getJob(String key)
getJob
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_EXECUTE\')") public void actionJob(String key, JobAction action)
actionJob
in class AbstractExecutableLogic<TaskTO>
@PreAuthorize(value="hasRole(\'TASK_DELETE\')") public List<PropagationTaskTO> purgePropagations(Date since, List<ExecStatus> statuses, List<String> resources)
protected TaskTO resolveReference(Method method, Object... args) throws UnresolvedReferenceException
UnresolvedReferenceException
protected JobTO getJobTO(org.quartz.JobKey jobKey, boolean includeCustom) throws org.quartz.SchedulerException
org.quartz.SchedulerException
protected void doActionJob(org.quartz.JobKey jobKey, JobAction action)
public T resolveBeanReference(Method method, Object... args) throws UnresolvedReferenceException
method
- method.args
- method arguments.UnresolvedReferenceException
- in case of failures, read-only methods and unresolved bean.Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.