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 String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "UserMessage" objects.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_REPLY
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , edit , reply , deletestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , deletestatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , editstatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_REPLY
This rank is made of the following privileges: reply , view , editstatic String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic QueryObjectType<UserMessage>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.static com.redwood.scheduler.infrastructure.logging.Versions
VERSION_USERMESSAGE
-
Fields inherited from interface com.redwood.scheduler.api.model.PartitionableRootObject
VERSION_PARTITIONABLEROOTOBJECT
-
Fields inherited from interface com.redwood.scheduler.api.model.Root
VERSION_ROOT
-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM, VERSION_SCHEDULERENTITY
-
Fields inherited from interface com.redwood.scheduler.api.model.compatibility_14.SchedulerEntityComp
VERSION_SCHEDULERENTITYCOMP
-
Fields inherited from interface com.redwood.scheduler.api.model.compatibility_14.UserMessageComp
VERSION_USERMESSAGECOMP
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canDelegate()
Can a UserMessage be delegated?boolean
canForward()
Can a UserMessage be forwarded?boolean
canReply()
Can a UserMessage be replied?RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkReplyPrivilege()
Check whether or not the reply action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.UserMessageAttachment
createUserMessageAttachment()
Create a newUserMessageAttachment
linked to this object.UserMessageHistory
createUserMessageHistory()
Create a newUserMessageHistory
linked to this object.UserMessageParticipant
createUserMessageParticipant()
Create a newUserMessageParticipant
linked to this object.boolean
delegate(Subject assignee)
Delegate the message to another user to take ownership of the message.boolean
forward(Subject receiver)
Forward the message to another party for them to comment.Subject
getAssignee()
Get the currently responsible subject for the User MessageJob
getJob()
Get the Job.Long
getNumAdditionalLines()
Get the value for NumAdditionalLines.Subject
getPreviousAssignee()
Get the subject that was previously responsible for the User MessageSubject
getRepliedSubject()
Get the RepliedSubject.String
getReplyComment()
Get the value for ReplyComment.DateTimeZone
getReplyTime()
Get the value for ReplyTime.ProcessMonitorItemStatus
getStatus()
Get the value for Status.String
getText()
Get the value for Text.String
getTitleText()
Get the value for TitleText.RWIterable<UserMessageAttachment>
getUserMessageAttachments()
Get anRWIterable
over an ordered collection ofUserMessageAttachments
.UserMessageDefinition
getUserMessageDefinition()
Get the UserMessageDefinition.UserMessageDefinitionResponse
getUserMessageDefinitionResponse()
Get the UserMessageDefinitionResponse.RWIterable<UserMessageHistory>
getUserMessageHistories()
Get anRWIterable
over a collection ofUserMessageHistories
, the collection will be ordered by UniqueId.RWIterable<UserMessageParticipant>
getUserMessageParticipants()
Get anRWIterable
over an ordered collection ofUserMessageParticipants
.void
notifyAssignee()
Send a notification message to the currently assigned userString
renderHistoryAsHTML(String cssPrefix)
Render the history of a UserMessage in an HTML table.String
renderHistoryAsText()
Render the history of a UserMessage in a text table.boolean
respond()
Return the message to the previous assignee.void
setJob(Job newJob)
Set the value for Job.void
setReplyComment(String newReplyComment)
Set the value for ReplyComment.void
setStatus(ProcessMonitorItemStatus newStatus)
Set the value for Status.void
setText(String newText)
Set the value for Text.void
setUserMessageDefinition(UserMessageDefinition newUserMessageDefinition)
Set the value for UserMessageDefinition.void
setUserMessageDefinitionResponse(UserMessageDefinitionResponse newUserMessageDefinitionResponse)
Set the value for UserMessageDefinitionResponse.boolean
start()
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
-
VERSION_USERMESSAGE
static final com.redwood.scheduler.infrastructure.logging.Versions VERSION_USERMESSAGE
-
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 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.
-
getTitleText
String getTitleText()
Get the value for TitleText. (The title text of the UserMessage.) 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.
-
getStatus
ProcessMonitorItemStatus getStatus()
Get the value for Status. (The status of the ProcessMonitorItem) 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.
-
getReplyComment
String getReplyComment()
Get the value for ReplyComment. (The response comment)- Returns:
- the field
- Throws:
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:
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 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.
-
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:
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:
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:
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:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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:
ObjectDeletedException
- If this method is called when the object has been marked for deletion.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 anRWIterable
over 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:
getUserMessageAttachments
in interfaceUserMessageComp
- Returns:
- An
RWIterable
over an ordered collection ofUserMessageAttachment
objects .
-
createUserMessageAttachment
UserMessageAttachment createUserMessageAttachment()
Create a newUserMessageAttachment
linked to this object.- Returns:
- a new
UserMessageAttachment
.
-
getUserMessageHistories
RWIterable<UserMessageHistory> getUserMessageHistories()
Get anRWIterable
over 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:
getUserMessageHistories
in interfaceUserMessageComp
- Returns:
- An
RWIterable
over a collection ofUserMessageHistory
objects , the collection will be ordered by UniqueId.
-
createUserMessageHistory
UserMessageHistory createUserMessageHistory()
Create a newUserMessageHistory
linked to this object.- Returns:
- a new
UserMessageHistory
.
-
getUserMessageParticipants
RWIterable<UserMessageParticipant> getUserMessageParticipants()
Get anRWIterable
over 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:
getUserMessageParticipants
in interfaceUserMessageComp
- Returns:
- An
RWIterable
over an ordered collection ofUserMessageParticipant
objects .
-
createUserMessageParticipant
UserMessageParticipant createUserMessageParticipant()
Create a newUserMessageParticipant
linked 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance 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
RequiredPermission
instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-