Package com.redwood.scheduler.api.model
Interface UserMessage
-
- All Superinterfaces:
PartitionableRootObject,Root,SchedulerEntity,SchedulerEntityComp,UserMessageComp
public interface UserMessage extends UserMessageComp, PartitionableRootObject
The UserMessage object for information pertaining to the User Message in the Process Monitor.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "UserMessage" objects.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_REPLYThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWThis privilege can be granted at a group level.static StringSEC_RANK_ALLThis rank is made of the following privileges: create , view , edit , reply , deletestatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , view , deletestatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , view , editstatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringSEC_RANK_REPLYThis rank is made of the following privileges: reply , view , editstatic StringSEC_RANK_VIEWThis rank is made of the following privileges: viewstatic QueryObjectType<UserMessage>TYPEType 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 booleancanDelegate()Can a UserMessage be delegated?booleancanForward()Can a UserMessage be forwarded?booleancanReply()Can a UserMessage be replied?RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckReplyPrivilege()Check whether or not the reply action can be performed on this object.RequiredPermissioncheckViewPrivilege()Check whether or not the view action can be performed on this object.UserMessageAttachmentcreateUserMessageAttachment()Create a newUserMessageAttachmentlinked to this object.UserMessageHistorycreateUserMessageHistory()Create a newUserMessageHistorylinked to this object.UserMessageParticipantcreateUserMessageParticipant()Create a newUserMessageParticipantlinked to this object.booleandelegate(Subject assignee)Delegate the message to another user to take ownership of the message.booleanforward(Subject receiver)Forward the message to another party for them to comment.SubjectgetAssignee()Get the currently responsible subject for the User MessageJobgetJob()Get the Job.LonggetNumAdditionalLines()Get the value for NumAdditionalLines.SubjectgetPreviousAssignee()Get the subject that was previously responsible for the User MessageSubjectgetRepliedSubject()Get the RepliedSubject.StringgetReplyComment()Get the value for ReplyComment.DateTimeZonegetReplyTime()Get the value for ReplyTime.ProcessMonitorItemStatusgetStatus()Get the value for Status.StringgetText()Get the value for Text.StringgetTitleText()Get the value for TitleText.RWIterable<UserMessageAttachment>getUserMessageAttachments()Get anRWIterableover an ordered collection ofUserMessageAttachments.UserMessageDefinitiongetUserMessageDefinition()Get the UserMessageDefinition.UserMessageDefinitionResponsegetUserMessageDefinitionResponse()Get the UserMessageDefinitionResponse.RWIterable<UserMessageHistory>getUserMessageHistories()Get anRWIterableover a collection ofUserMessageHistories, the collection will be ordered by UniqueId.RWIterable<UserMessageParticipant>getUserMessageParticipants()Get anRWIterableover an ordered collection ofUserMessageParticipants.voidnotifyAssignee()Send a notification message to the currently assigned userStringrenderHistoryAsHTML(String cssPrefix)Render the history of a UserMessage in an HTML table.StringrenderHistoryAsText()Render the history of a UserMessage in a text table.booleanrespond()Return the message to the previous assignee.voidsetJob(Job newJob)Set the value for Job.voidsetReplyComment(String newReplyComment)Set the value for ReplyComment.voidsetStatus(ProcessMonitorItemStatus newStatus)Set the value for Status.voidsetText(String newText)Set the value for Text.voidsetUserMessageDefinition(UserMessageDefinition newUserMessageDefinition)Set the value for UserMessageDefinition.voidsetUserMessageDefinitionResponse(UserMessageDefinitionResponse newUserMessageDefinitionResponse)Set the value for UserMessageDefinitionResponse.booleanstart()Start the user message-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableRootObject
getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
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 "UserMessage" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<UserMessage> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_REPLY
static final String SEC_PRIV_REPLY
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_REPLY
static final String SEC_RANK_REPLY
This rank is made of the following privileges: reply , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , reply , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
getText
String getText()
Get the value for Text. (The text of the UserMessage.) This value is mandatory, and therefore will not benullif 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.
-
getTitleText
String getTitleText()
Get the value for TitleText. (The title text of the UserMessage.) This value is mandatory, and therefore will not benullif 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
ProcessMonitorItemStatus getStatus()
Get the value for Status. (The status of the ProcessMonitorItem) This value is mandatory, and therefore will not benullif 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.
-
getReplyComment
String getReplyComment()
Get the value for ReplyComment. (The response comment)- 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.
-
getReplyTime
DateTimeZone getReplyTime()
Get the value for ReplyTime. (When was this message replied to?)- 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.
-
getNumAdditionalLines
Long getNumAdditionalLines()
Get the value for NumAdditionalLines. (The number of additional lines to this message.) This value is mandatory, and therefore will not benullif 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.
-
setText
void setText(String newText)
Set the value for Text. (The text of the UserMessage.) This value is mandatory.- Parameters:
newText- the new value for Text. 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.
-
setStatus
void setStatus(ProcessMonitorItemStatus newStatus)
Set the value for Status. (The status of the ProcessMonitorItem) This value is mandatory.- Parameters:
newStatus- the new value for Status. 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.
-
setReplyComment
void setReplyComment(String newReplyComment)
Set the value for ReplyComment. (The response comment) This value is optional.- Parameters:
newReplyComment- the new value for ReplyComment.- 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.
-
start
boolean start()
Start the user message- Returns:
- Returns true is the user message was started
-
notifyAssignee
void notifyAssignee()
Send a notification message to the currently assigned user
-
respond
boolean respond()
Return the message to the previous assignee.- Returns:
- Returns true if the user message was returned
-
forward
boolean forward(Subject receiver)
Forward the message to another party for them to comment.- Parameters:
receiver- The receiver of the message- Returns:
- Returns true if the user message was forwarded
-
delegate
boolean delegate(Subject assignee)
Delegate the message to another user to take ownership of the message.- Parameters:
assignee- The new assignee of the message- Returns:
- Returns true if the user message was delegated
-
getAssignee
Subject getAssignee()
Get the currently responsible subject for the User Message- Returns:
- Returns the currently assigned user for the message
-
getPreviousAssignee
Subject getPreviousAssignee()
Get the subject that was previously responsible for the User Message- Returns:
- Returns the previously assigned user for the message
-
renderHistoryAsHTML
String renderHistoryAsHTML(String cssPrefix)
Render the history of a UserMessage in an HTML table.- Parameters:
cssPrefix- Prefix to be appended to the styling of the HTML Table.- Returns:
- The HTML Table.
-
renderHistoryAsText
String renderHistoryAsText()
Render the history of a UserMessage in a text table.- Returns:
- The text Table.
-
canReply
boolean canReply()
Can a UserMessage be replied?- Returns:
- True if the message can be replied
-
canDelegate
boolean canDelegate()
Can a UserMessage be delegated?- Returns:
- True if the message can be delegated
-
canForward
boolean canForward()
Can a UserMessage be forwarded?- Returns:
- True if the message can be forwarded
-
getUserMessageDefinitionResponse
UserMessageDefinitionResponse getUserMessageDefinitionResponse()
Get the UserMessageDefinitionResponse.- Returns:
- UserMessageDefinitionResponse
- 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.
-
getUserMessageDefinition
UserMessageDefinition getUserMessageDefinition()
Get the UserMessageDefinition.- Returns:
- UserMessageDefinition
- 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.
-
getJob
Job getJob()
Get the Job.- Returns:
- Job
- 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.
-
getRepliedSubject
Subject getRepliedSubject()
Get the RepliedSubject.- Returns:
- RepliedSubject
- 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.
-
setUserMessageDefinitionResponse
void setUserMessageDefinitionResponse(UserMessageDefinitionResponse newUserMessageDefinitionResponse)
Set the value for UserMessageDefinitionResponse. This value is optional.- Parameters:
newUserMessageDefinitionResponse- is the object to set UserMessageDefinitionResponse to. The selected action of the UserMessageReply.
-
setUserMessageDefinition
void setUserMessageDefinition(UserMessageDefinition newUserMessageDefinition)
Set the value for UserMessageDefinition. This value is optional.- Parameters:
newUserMessageDefinition- is the object to set UserMessageDefinition to. User Message this Reply is for
-
setJob
void setJob(Job newJob)
Set the value for Job. This value is optional.- Parameters:
newJob- is the object to set Job to. The related UserMessage job that created this user message
-
getUserMessageAttachments
RWIterable<UserMessageAttachment> getUserMessageAttachments()
Get anRWIterableover an ordered collection ofUserMessageAttachments. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The JobFiles for a UserMessage- Specified by:
getUserMessageAttachmentsin interfaceUserMessageComp- Returns:
- An
RWIterableover an ordered collection ofUserMessageAttachmentobjects .
-
createUserMessageAttachment
UserMessageAttachment createUserMessageAttachment()
Create a newUserMessageAttachmentlinked to this object.- Returns:
- a new
UserMessageAttachment.
-
getUserMessageHistories
RWIterable<UserMessageHistory> getUserMessageHistories()
Get anRWIterableover a collection ofUserMessageHistories, the collection will be ordered by UniqueId. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. The history of the UserMessage response flow.- Specified by:
getUserMessageHistoriesin interfaceUserMessageComp- Returns:
- An
RWIterableover a collection ofUserMessageHistoryobjects , the collection will be ordered by UniqueId.
-
createUserMessageHistory
UserMessageHistory createUserMessageHistory()
Create a newUserMessageHistorylinked to this object.- Returns:
- a new
UserMessageHistory.
-
getUserMessageParticipants
RWIterable<UserMessageParticipant> getUserMessageParticipants()
Get anRWIterableover an ordered collection ofUserMessageParticipants. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull. Who can respond to this User Message- Specified by:
getUserMessageParticipantsin interfaceUserMessageComp- Returns:
- An
RWIterableover an ordered collection ofUserMessageParticipantobjects .
-
createUserMessageParticipant
UserMessageParticipant createUserMessageParticipant()
Create a newUserMessageParticipantlinked to this object.- Returns:
- a new
UserMessageParticipant.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkReplyPrivilege
RequiredPermission checkReplyPrivilege()
Check whether or not the reply action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-