Package com.redwood.scheduler.api.model
Interface Event
-
- All Superinterfaces:
BusinessKeyObject
,Detail
,EventComp
,SchedulerEntity
,SchedulerEntityComp
public interface Event extends EventComp, Detail, BusinessKeyObject
An event is a particular instance of an EventDefinition. At most one event per EventDefinition will be raised at any point in time. There may be a list of events that Pending, the most recent of these will be raised when the currently raised Event is Cleared. There may also be a list of Events that have already been cleared, if appropriately configured these will be automatically deleted after a set period of time.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Event" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<Event>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
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 void
clear()
Clear the currently raised Event for this EventDefinition.FileEvent
createFileEvent()
Create a newFileEvent
linked to this object.String
getClearerComment()
Get the value for ClearerComment.SchedulerEntity
getClearerObject()
Get the value for ClearerObject.ObjectDefinition
getClearerObjectDefinition()
Get the ClearerObjectDefinition.DateTimeZone
getClearTime()
Get the value for ClearTime.DateTimeZone
getCreationTime()
Get the value for CreationTime.EventDefinition
getEventDefinition()
Get the EventDefinition.RWIterable<FileEvent>
getFileEvents()
Get anRWIterable
over an ordered collection ofFileEvents
.RWIterable<JobRaiseEvent>
getJobRaiseEvents()
Get anRWIterable
over an ordered collection ofJobRaiseEvents
.RWIterable<JobWaitEvent>
getJobWaitEvents()
Get anRWIterable
over an ordered collection ofJobWaitEvents
.DateTimeZone
getLastModificationTime()
Get the value for LastModificationTime.Subject
getLastModifierSubject()
Get the LastModifierSubject.Long
getRaisedSequence()
Get the value for RaisedSequence.String
getRaiserComment()
Get the value for RaiserComment.SchedulerEntity
getRaiserObject()
Get the value for RaiserObject.ObjectDefinition
getRaiserObjectDefinition()
Get the RaiserObjectDefinition.DateTimeZone
getRaiseTime()
Get the value for RaiseTime.EventStatus
getStatus()
Get the value for Status.boolean
isRaisedByJob()
Get the value for RaisedByJob.void
setClearerComment(String newClearerComment)
Set the value for ClearerComment.void
setClearerObject(SchedulerEntity newClearerObject)
Set the value for ClearerObject.void
setClearerObjectDefinition(ObjectDefinition newClearerObjectDefinition)
Set the value for ClearerObjectDefinition.void
setRaiserComment(String newRaiserComment)
Set the value for RaiserComment.void
setRaiserObject(SchedulerEntity newRaiserObject)
Set the value for RaiserObject.void
setRaiserObjectDefinition(ObjectDefinition newRaiserObjectDefinition)
Set the value for RaiserObjectDefinition.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
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
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Event" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<Event> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
getClearTime
DateTimeZone getClearTime()
Get the value for ClearTime. (Timestamp that notes when this Event was cleared.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getCreationTime
DateTimeZone getCreationTime()
Get the value for CreationTime. (Timestamp that notes when the Event was raised.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getLastModificationTime
DateTimeZone getLastModificationTime()
Get the value for LastModificationTime. (Timestamp that notes when the Event was raised.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaiseTime
DateTimeZone getRaiseTime()
Get the value for RaiseTime. (Timestamp that notes when the EventDefinition was raised because of this Event.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
isRaisedByJob
boolean isRaisedByJob()
Get the value for RaisedByJob. (Was this Event raised by a JobRaiseEvent, or directly from a Job? Even if this returns true, the RaiserJob might still be null if the Job has since been deleted.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaisedSequence
Long getRaisedSequence()
Get the value for RaisedSequence. (Unique id for this event generated when it was raised. This is only guaranteed to be unique for this event, that is, if two EventDefinitions are raised, they may have the same RaisedSequence, however, if the same EventDefinition is raised twice, then each raise is guaranteed to generate an unique RaisedSequence.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaiserComment
String getRaiserComment()
Get the value for RaiserComment. (Comment made by the raiser when it raised this event.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getRaiserObject
SchedulerEntity getRaiserObject()
Get the value for RaiserObject. (The object that raised this event. If the event was raised manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getClearerComment
String getClearerComment()
Get the value for ClearerComment. (Comment made by the clearer when it cleared this event.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getClearerObject
SchedulerEntity getClearerObject()
Get the value for ClearerObject. (The object that cleared this event. If the event was cleared manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
getStatus
EventStatus getStatus()
Get the value for Status. (In which part of its lifecycle is this Event?) This value is mandatory, and therefore will not benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRaiserComment
void setRaiserComment(String newRaiserComment)
Set the value for RaiserComment. (Comment made by the raiser when it raised this event.) This value is optional.- Parameters:
newRaiserComment
- the new value for RaiserComment.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setRaiserObject
void setRaiserObject(SchedulerEntity newRaiserObject)
Set the value for RaiserObject. (The object that raised this event. If the event was raised manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory.- Parameters:
newRaiserObject
- the new value for RaiserObject. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setClearerComment
void setClearerComment(String newClearerComment)
Set the value for ClearerComment. (Comment made by the clearer when it cleared this event.) This value is optional.- Parameters:
newClearerComment
- the new value for ClearerComment.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
setClearerObject
void setClearerObject(SchedulerEntity newClearerObject)
Set the value for ClearerObject. (The object that cleared this event. If the event was cleared manually, it is set to the current user. This will be null if the object has been deleted. Users will only be able to set a job, while the system can also set other object types.) This value is mandatory.- Parameters:
newClearerObject
- the new value for ClearerObject. If this isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- This will be thrown if this method is called while the object is not attached to a session.
-
clear
void clear()
Clear the currently raised Event for this EventDefinition. This method will not do anything if there is no currently raised event. The session needs to be persisted before the Event will be cleared in the database.
-
getEventDefinition
EventDefinition getEventDefinition()
Get the EventDefinition.- Returns:
- EventDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getClearerObjectDefinition
ObjectDefinition getClearerObjectDefinition()
Get the ClearerObjectDefinition.- Returns:
- ClearerObjectDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getRaiserObjectDefinition
ObjectDefinition getRaiserObjectDefinition()
Get the RaiserObjectDefinition.- Returns:
- RaiserObjectDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getLastModifierSubject
Subject getLastModifierSubject()
Get the LastModifierSubject.- Returns:
- LastModifierSubject
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
setClearerObjectDefinition
void setClearerObjectDefinition(ObjectDefinition newClearerObjectDefinition)
Set the value for ClearerObjectDefinition. This value is optional.- Parameters:
newClearerObjectDefinition
- is the object to set ClearerObjectDefinition to. What type of object cleared this event?
-
setRaiserObjectDefinition
void setRaiserObjectDefinition(ObjectDefinition newRaiserObjectDefinition)
Set the value for RaiserObjectDefinition. This value is optional.- Parameters:
newRaiserObjectDefinition
- is the object to set RaiserObjectDefinition to. What type of object raised this event?
-
getFileEvents
RWIterable<FileEvent> getFileEvents()
Get anRWIterable
over an ordered collection ofFileEvents
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. Information about the EventSourceDefinition (if any) that triggered this event.- Specified by:
getFileEvents
in interfaceEventComp
- Returns:
- An
RWIterable
over an ordered collection ofFileEvent
objects .
-
createFileEvent
FileEvent createFileEvent()
Create a newFileEvent
linked to this object.- Returns:
- a new
FileEvent
.
-
getJobRaiseEvents
RWIterable<JobRaiseEvent> getJobRaiseEvents()
Get anRWIterable
over an ordered collection ofJobRaiseEvents
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. If this is set, then the associated Job raised this instance of its associated EventDefinition.- Specified by:
getJobRaiseEvents
in interfaceEventComp
- Returns:
- An
RWIterable
over an ordered collection ofJobRaiseEvent
objects .
-
getJobWaitEvents
RWIterable<JobWaitEvent> getJobWaitEvents()
Get anRWIterable
over an ordered collection ofJobWaitEvents
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. If this is set, then the associated Job no longer needs to wait on its associated EventDefinition.- Specified by:
getJobWaitEvents
in interfaceEventComp
- Returns:
- An
RWIterable
over an ordered collection ofJobWaitEvent
objects .
-
-