Package com.redwood.scheduler.api.model
Interface RaiseEvent
-
- All Superinterfaces:
Detail
,Precondition
,SchedulerEntity
,SchedulerEntityComp
- All Known Subinterfaces:
JobChainCallRaiseEvent
,JobDefinitionRaiseEvent
,JobRaiseEvent
public interface RaiseEvent extends Precondition
This holds all of the fields common to JobRaiseEvent, JobDefinitionRaiseEvent and JobChainCallRaiseEvent.
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_JOBDEFINITION
This will be replaced by the job definition name (without the GLOBAL prefix if it is in GLOBAL, otherwise with the partition as a prefix) for a job raise event only.static String
KEY_JOBDEFINITION_NAME
This will be replaced by the job definition name only, for a job raise event only.static String
KEY_JOBDEFINITION_PARTITION
This will be replaced by the job definition partition only, for a job raise event only.static String
KEY_JOBDESCRIPTION
This will be replaced by Job.getDescription().static String
KEY_JOBID
This will be replaced by Job.getJobId().static String
KEY_JOBSTATUS
This will be replaced by Job.getStatus() for a job raise event only.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Long
getErrorCode()
Get the value for ErrorCode.String
getRaiseComment()
Get the value for RaiseComment.JobStatus
getStatusToRaiseOn()
Get the value for StatusToRaiseOn.void
setErrorCode(Long newErrorCode)
Set the value for ErrorCode.void
setRaiseComment(String newRaiseComment)
Set the value for RaiseComment.void
setStatusToRaiseOn(JobStatus newStatusToRaiseOn)
Set the value for StatusToRaiseOn.-
Methods inherited from interface com.redwood.scheduler.api.model.Precondition
getExpression, getTimeWindow, getTimeWindowStatus, getTimeZone, setExpression, setTimeWindow, setTimeWindowStatus, setTimeZone
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
KEY_JOBID
static final String KEY_JOBID
This will be replaced by Job.getJobId().- See Also:
- Constant Field Values
-
KEY_JOBDESCRIPTION
static final String KEY_JOBDESCRIPTION
This will be replaced by Job.getDescription().- See Also:
- Constant Field Values
-
KEY_JOBSTATUS
static final String KEY_JOBSTATUS
This will be replaced by Job.getStatus() for a job raise event only.- See Also:
- Constant Field Values
-
KEY_JOBDEFINITION
static final String KEY_JOBDEFINITION
This will be replaced by the job definition name (without the GLOBAL prefix if it is in GLOBAL, otherwise with the partition as a prefix) for a job raise event only.- See Also:
- Constant Field Values
-
KEY_JOBDEFINITION_NAME
static final String KEY_JOBDEFINITION_NAME
This will be replaced by the job definition name only, for a job raise event only.- See Also:
- Constant Field Values
-
KEY_JOBDEFINITION_PARTITION
static final String KEY_JOBDEFINITION_PARTITION
This will be replaced by the job definition partition only, for a job raise event only.- See Also:
- Constant Field Values
-
-
Method Detail
-
getErrorCode
Long getErrorCode()
Get the value for ErrorCode. (If StatusToRaiseOn is JobStatus.Error or JobStatus.Killed, and ErrorCode is non null, then the Event will only be raised if the Job.getStatus() is JobStatus.Error or JobStatus.Killed (as appropriate) and Job.ReturnCode() is the same as getErrorCode().)- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaiseComment
String getRaiseComment()
Get the value for RaiseComment. (The comment to set in the RaiserComment field of the raised Event when the appropriate conditions are set. In the resulting string the following substitutions will take place:${jobid}
will be replaced by Job.getJobId().${jobdescription}
will be replaced by Job.getDescription().${jobstatus}
will be replaced by Job.getStatus(), this will be the same as StatusToRaiseOn.
null
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getStatusToRaiseOn
JobStatus getStatusToRaiseOn()
Get the value for StatusToRaiseOn. (The status that needs to be reached to raise the associated EventDefinition.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setErrorCode
void setErrorCode(Long newErrorCode)
Set the value for ErrorCode. (If StatusToRaiseOn is JobStatus.Error or JobStatus.Killed, and ErrorCode is non null, then the Event will only be raised if the Job.getStatus() is JobStatus.Error or JobStatus.Killed (as appropriate) and Job.ReturnCode() is the same as getErrorCode().) This value is optional.- Parameters:
newErrorCode
- the new value for ErrorCode.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRaiseComment
void setRaiseComment(String newRaiseComment)
Set the value for RaiseComment. (The comment to set in the RaiserComment field of the raised Event when the appropriate conditions are set. In the resulting string the following substitutions will take place:${jobid}
will be replaced by Job.getJobId().${jobdescription}
will be replaced by Job.getDescription().${jobstatus}
will be replaced by Job.getStatus(), this will be the same as StatusToRaiseOn.
- Parameters:
newRaiseComment
- the new value for RaiseComment. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setStatusToRaiseOn
void setStatusToRaiseOn(JobStatus newStatusToRaiseOn)
Set the value for StatusToRaiseOn. (The status that needs to be reached to raise the associated EventDefinition.) This value is mandatory.- Parameters:
newStatusToRaiseOn
- the new value for StatusToRaiseOn. If this isnull
, then the object cannot be persisted.- Throws:
ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
-