@AccessLevel(value=EXTERNAL)
public class ParticipantMessage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.StringBuffer |
body
The message body.
|
protected curam.util.type.DateTime |
effectiveDateTime
The date time at which this message should be displayed.
|
protected java.lang.String |
effectiveDateTimeDescription
The effective date description
|
protected java.lang.String |
image
The image to be displayed along with this message.
|
protected java.lang.Boolean |
isPriority
Indicates the priority of this message.
|
protected java.lang.Boolean |
isRichText
Indicates whether this message is rich text.
|
protected java.util.ArrayList<ParticipantMessageLink> |
links
A list of the links to be included in the message.
|
protected java.util.HashMap<java.lang.String,java.lang.String> |
parameters
This hash map contains parameters that are to be substituted into the
message body or message title.
|
protected curam.participantmessages.configuration.impl.ParticipantMessageConfigurationDAO |
participantMessageConfigurationDAO |
protected java.lang.String |
title
The title of the message.
|
protected curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry |
type
The type of message.
|
Constructor and Description |
---|
ParticipantMessage(curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry messageType)
Constructor used to create participant messages.
|
ParticipantMessage(curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry messageType,
java.lang.String messageTitle,
java.lang.String messageBody)
Constructor used to create participant messages and populate the mandatory
attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
addImage(java.lang.String imageValue)
Adds an image to be displayed in conjunction with this message.
|
void |
addLink(ParticipantMessageLink link)
Adds a
ParticipantMessageLink to this message. |
void |
addParameter(java.lang.String paramReference,
java.lang.String paramValue)
Adds a parameter to the map.
|
void |
addParameters(java.util.HashMap<java.lang.String,java.lang.String> theParameters)
Adds a number of parameters to the map of parameters for this message.
|
void |
appendSentenceToMessageBody(java.lang.String sentence)
Appends a blank space, and the String argument passed in to the current
message body String.
|
void |
appendToMessageBody(java.lang.String textToAppend)
Appends the String argument to the current message body String.
|
curam.util.type.DateTime |
getEffectiveDateTime()
Returns the date time at which this message becomes pertinent and is
displayed.
|
java.lang.String |
getEffectiveDateTimeDescription()
Returns the effectiveDate description.
|
java.lang.String |
getImage()
Returns the name of the image relating to this message.
|
ParticipantMessageLink |
getLinkBy(java.lang.String name)
Returns the link for this message that has the name specified as an
argument, or null if no link exists for this message with that name.
|
java.lang.String |
getMessageBody()
Returns the message body as a String.
|
java.lang.String |
getMessageTitle()
Returns the message title as a String.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getParameters()
Returns a HashMap of the parameters that have been added to this message.
|
java.lang.Integer |
getSortOrder()
Retrieves and returns the configurable sort order for this message's type.
|
curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry |
getType()
Returns the type of this message, taken from the ParticipantMessageType
codetable.
|
java.lang.Boolean |
isPriority()
Returns whether this is a priority message.
|
java.lang.Boolean |
isRichText()
Returns whether this is a rich text message.
|
void |
prioritize()
Sets the indicator that indicates that this message is priority.
|
void |
setEffectiveDateTime(curam.util.type.DateTime anEffectiveDateTime)
Sets the effective date time for this message.
|
void |
setEffectiveDateTimeDescription(java.lang.String effectiveDateTimeDescription)
Sets the effective date time description for this message.
|
void |
setMessageBody(java.lang.String messageBody)
Sets the message body.
|
void |
setMessageTitle(java.lang.String messageTitle)
Sets the message title.
|
void |
setRichText(boolean richText)
Used to indicate that this message is rich text.
|
protected java.lang.String title
protected java.lang.StringBuffer body
protected java.lang.String image
protected java.lang.String effectiveDateTimeDescription
protected java.util.HashMap<java.lang.String,java.lang.String> parameters
protected java.util.ArrayList<ParticipantMessageLink> links
protected curam.util.type.DateTime effectiveDateTime
protected java.lang.Boolean isPriority
protected curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry type
protected java.lang.Boolean isRichText
@Inject protected curam.participantmessages.configuration.impl.ParticipantMessageConfigurationDAO participantMessageConfigurationDAO
public ParticipantMessage(curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry messageType, java.lang.String messageTitle, java.lang.String messageBody)
messageType
- The type of message, taken from the ParticipantMessageType
codetable.messageTitle
- the title of this message.messageBody
- the body text of this message.public ParticipantMessage(curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry messageType)
messageType
- The type of message, taken from the ParticipantMessageType
codetable.public void addImage(java.lang.String imageValue)
imageValue
- the AppResource.name for the AppResource record for the image to
be displayed.public java.lang.String getImage()
public void addParameter(java.lang.String paramReference, java.lang.String paramValue)
paramReference
- a string place holder that is present in either the message title
or body. Used to indicate where the value parameter should be
positioned in a message.paramValue
- the value to be substituted in place of the place holder.public void addParameters(java.util.HashMap<java.lang.String,java.lang.String> theParameters)
addParameter(String, String)
for guidance on how
to manage parameters.theParameters
- A HashMap of parameters to be added.public java.lang.String getMessageTitle()
public void setMessageTitle(java.lang.String messageTitle)
messageTitle
- String value to be set as the message title.public java.lang.String getMessageBody()
public void setMessageBody(java.lang.String messageBody)
appendToMessageBody(String)
.messageBody
- String value to be set as the message body.public void appendToMessageBody(java.lang.String textToAppend)
textToAppend
- String to be appended.public void appendSentenceToMessageBody(java.lang.String sentence)
textToAppend
- String to be appended.public java.util.HashMap<java.lang.String,java.lang.String> getParameters()
public java.lang.Boolean isPriority()
public java.lang.Boolean isRichText()
public void setRichText(boolean richText)
richText
- boolean indicating whether this is a rich text message.public curam.util.type.DateTime getEffectiveDateTime()
public java.lang.String getEffectiveDateTimeDescription()
public curam.participantmessages.codetable.impl.ParticipantMessageTypeEntry getType()
public java.lang.Integer getSortOrder()
public void prioritize()
public void setEffectiveDateTime(curam.util.type.DateTime anEffectiveDateTime)
anEffectiveDateTime
- the effective date time to be set for this message.public void setEffectiveDateTimeDescription(java.lang.String effectiveDateTimeDescription)
anEffectiveDateTimeDescription
- the effective date time description to be set for this message.public void addLink(ParticipantMessageLink link)
ParticipantMessageLink
to this message.link
- a ParticipantMessageLink
that is to be included in this
message.public ParticipantMessageLink getLinkBy(java.lang.String name)
name
- The name of the link to be returned.