Package org.cyclos.impl.system
Interface CustomScheduledTaskServiceLocal
-
- All Superinterfaces:
CRUDService<CustomScheduledTaskDTO,CustomScheduledTaskData,Void>,CRUDServiceLocal<CustomScheduledTask,CustomScheduledTaskDTO,CustomScheduledTaskData,Void>,CustomScheduledTaskService,Service
- All Known Implementing Classes:
CustomScheduledTaskServiceImpl
public interface CustomScheduledTaskServiceLocal extends CRUDServiceLocal<CustomScheduledTask,CustomScheduledTaskDTO,CustomScheduledTaskData,Void>, CustomScheduledTaskService
Local interface forCustomScheduledTaskService
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_LOGScript attribute: the custom scheduled task log for this executionstatic StringATTR_SCHEDULED_TASKScript attribute: the custom scheduled task
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DategetNextExecution(CustomScheduledTask task)Calculates the next execution date, given the parameters.List<Long>listIdsForRunningNow()Returns a list with all custom scheduled task ids which should start running immediatelybooleanrun(Long taskId)Runs the task with the given identifier, generating a log.-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.system.CustomScheduledTaskService
list, runNow, searchLogs
-
-
-
-
Field Detail
-
ATTR_SCHEDULED_TASK
static final String ATTR_SCHEDULED_TASK
Script attribute: the custom scheduled task- See Also:
- Constant Field Values
-
ATTR_LOG
static final String ATTR_LOG
Script attribute: the custom scheduled task log for this execution- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextExecution
Date getNextExecution(CustomScheduledTask task)
Calculates the next execution date, given the parameters. Is a separated method to allow testing
-
listIdsForRunningNow
List<Long> listIdsForRunningNow()
Returns a list with all custom scheduled task ids which should start running immediately
-
run
boolean run(Long taskId)
Runs the task with the given identifier, generating a log. Assumes there is no current transaction.
-
-