@PersistJobDataAfterExecution @DisallowConcurrentExecution public class AmetysJob extends Object implements Job
Job
which delegates the execution of the task to the right Schedulable
Modifier and Type | Field and Description |
---|---|
protected static Context |
_environmentContext
The cocoon environment context.
|
protected static SchedulableExtensionPoint |
_schedulableEP
The extension point for
Schedulable s |
protected static Scheduler |
_scheduler
The scheduler component
|
protected static ServiceManager |
_serviceManager
The service manager
|
protected static UserManager |
_userManager
The user manager component
|
static String |
KEY_LAST_DURATION
The key for the last duration of the
execute(org.quartz.JobExecutionContext) method which is stored in the JobDataMap |
static String |
KEY_PREVIOUS_FIRE_TIME
The key for the previous fire time of this job which is stored in the
JobDataMap |
static String |
KEY_SUCCESS
The key for the success state of the last execution of the job
|
Constructor and Description |
---|
AmetysJob() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_checkConcurrency(String schedulableId,
String runnableId,
JobKey currentJobKey,
Logger logger) |
private boolean |
_setUserInSession(Map<String,Object> environmentInformation,
String userIdentityAsString) |
static void |
dispose()
Releases and destroys used resources
|
void |
execute(JobExecutionContext context) |
static void |
initialize(ServiceManager serviceManager,
Context context)
Initialize the static fields.
|
public static final String KEY_LAST_DURATION
execute(org.quartz.JobExecutionContext)
method which is stored in the JobDataMap
public static final String KEY_PREVIOUS_FIRE_TIME
JobDataMap
public static final String KEY_SUCCESS
protected static ServiceManager _serviceManager
protected static SchedulableExtensionPoint _schedulableEP
Schedulable
sprotected static Scheduler _scheduler
protected static Context _environmentContext
protected static UserManager _userManager
public AmetysJob()
public static void initialize(ServiceManager serviceManager, Context context) throws ServiceException, ContextException
serviceManager
- The service managercontext
- The contextServiceException
- if an error occurs during the lookup of the SchedulableExtensionPoint
ContextException
- if environment context object not foundpublic static void dispose()
public void execute(JobExecutionContext context) throws JobExecutionException
execute
in interface Job
JobExecutionException
private boolean _setUserInSession(Map<String,Object> environmentInformation, String userIdentityAsString)
private boolean _checkConcurrency(String schedulableId, String runnableId, JobKey currentJobKey, Logger logger) throws JobExecutionException
JobExecutionException