public class MessageAction extends ActionAdapter
Modifier and Type | Field and Description |
---|---|
static AuditEventTypeDefinition |
EVENTTYPE_MESSAGE_ADDED
The AuditEventTypeDefinition for the MESSAGE_ADDED action.
|
static AuditEventTypeDefinition |
EVENTTYPE_MESSAGE_EDITED
The AuditEventTypeDefinition for the MESSAGE_EDITED action.
|
static AuditEventTypeDefinition |
EVENTTYPE_MESSAGE_REMOVED
The AuditEventTypeDefinition for the MESSAGE_REMOVED action.
|
Constructor and Description |
---|
MessageAction()
Constructs a MessageAction to be used as an ActionFactory.
|
MessageAction(ActionFactory factory)
Constructs a "pending" MessageAction, to be used to execute a new Action.
|
MessageAction(ActionFactory factory,
AuditEvent event)
Constructs an "executed" MessageAction, reflecting a previously
executed Action.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttachment(Document doc)
Adds an attachment, prior to execution.
|
void |
addMessage(MessageEntry me)
Adds a new message, prior to execution.
|
void |
addMessage(MessageEntry me,
MessageEntry meRef)
Adds a new message, prior to execution.
|
void |
clearAllSettings()
Clears any previously-set settings on this Action instance.
|
Action |
constructExecutedAction(AuditEvent event)
Construct an instance reflecting a previously executed Action.
|
Action |
constructPendingAction()
Construct an instance of an Action that is not yet executed.
|
void |
editMessage(MessageEntry me)
Edits an existing message, prior to execution.
|
void |
execute()
Perform the Action execution.
|
List<Document> |
getAttachementList()
Returns the list of attachments for ad and edit actions
|
AuditEventTypeDefinition |
getAuditEventTypeDefinitionForAdd()
Gets the AuditEventTypeDefinition that should be used when executing a
"message added" action.
|
AuditEventTypeDefinition |
getAuditEventTypeDefinitionForEdit()
Gets the AuditEventTypeDefinition that should be used when executing a
"message edit" action.
|
AuditEventTypeDefinition |
getAuditEventTypeDefinitionForRemove()
Gets the AuditEventTypeDefinition that should be used when executing a
"message removed" action.
|
AuditEventTypeDefinition[] |
getAuditEventTypeDefinitions()
Gets the set of AuditEventTypeDefinitions for events
that can be posted by this Action associated with this type of Action.
|
String |
getMessage()
Returns the message setting.
|
MessageEntry |
getMessageEntry()
Returns the MessageEntry setting for edit or remove actions.
|
String |
getMessageEntryName()
Returns the MessageEntry name setting.
|
MessageEntry |
getReferencedMessageEntry()
Returns the MessageEntry reference, for messages that are "in reply to"
another MessageEntry.
|
boolean |
isMessageAdded()
Returns true if this action will add a message (when executed).
|
boolean |
isMessageEdited()
Returns true if this action will edit a message (when executed).
|
boolean |
isMessageRemoved()
Returns true if this action will remove a message (when executed).
|
void |
removeMessage(MessageEntry me)
Removes an existing message, prior to execution.
|
calculateOperationType, dispatchEvent, dispatchEvent, dispatchEvent, dispatchEvent, execute, execute, getActionSpecification, getActionSpecificationId, getActivityRecord, getActor, getAuditEventId, getAuditOperationType, getAuditOperationTypeKey, getAuxiliaryObjects, getAuxiliaryString, getExecutingUserId, getExecutionDate, getFirstAuxiliaryObject, getInstance, getInstance, getPerformedActivityRecord, getProperties, getPropertyTable, getSecondAuxiliaryObject, getSession, getTrackedActivityRecord, isActivityRecordFreed, isActivityRecordUndiscoverable, isActorFreed, isActorUndiscoverable, isFactory, isPendingExecution, isPreviouslyExecuted, postExecute, preExecute, setExecutingActionType
constructActivityEventTypeDefinition, initialize, isInitialized
public static final AuditEventTypeDefinition EVENTTYPE_MESSAGE_ADDED
public static final AuditEventTypeDefinition EVENTTYPE_MESSAGE_EDITED
public static final AuditEventTypeDefinition EVENTTYPE_MESSAGE_REMOVED
public MessageAction()
Called from ActionSpecification when initializing the ActionFactory to use for that specific ActionSpecification.
public MessageAction(ActionFactory factory) throws IfsException
factory
- the ActionFactory used to construct this instanceIfsException
- if operation failspublic MessageAction(ActionFactory factory, AuditEvent event) throws IfsException
factory
- the ActionFactory used to construct this instanceevent
- The event that was posted as part of the
previously executed Action.IfsException
- if operation failspublic Action constructPendingAction() throws IfsException
constructPendingAction
in class ActionFactory
IfsException
- if the operation fails.public Action constructExecutedAction(AuditEvent event) throws IfsException
constructExecutedAction
in class ActionFactory
event
- The event that was posted as part of the
previously executed Action.IfsException
- if the operation fails.public AuditEventTypeDefinition[] getAuditEventTypeDefinitions()
getAuditEventTypeDefinitions
in class ActionFactory
public AuditEventTypeDefinition getAuditEventTypeDefinitionForAdd()
public AuditEventTypeDefinition getAuditEventTypeDefinitionForRemove()
public AuditEventTypeDefinition getAuditEventTypeDefinitionForEdit()
public void clearAllSettings()
public void addMessage(MessageEntry me) throws IfsException
The new ME will not reference another MessageEntry.
me
- the MessageEntry that represents the message to addIfsException
- if operation failspublic void addMessage(MessageEntry me, MessageEntry meRef) throws IfsException
The new ME will reference the specified MessageEntry, so long as this MessageEntry is part of the same MessageList (else it will fail during execution of the Action).
me
- the MessageEntry that represents the message to addmeRef
- the referenced MessageEntryIfsException
- if operation failspublic void removeMessage(MessageEntry me) throws IfsException
me
- the MessageEntry that represents the message to removeIfsException
- if operation failspublic void editMessage(MessageEntry me) throws IfsException
me
- the MessageEntry that represents the message to editIfsException
- if operation failspublic void addAttachment(Document doc) throws IfsException
doc
- the Document to add as an attachmentIfsException
- if operation failspublic boolean isMessageAdded()
public boolean isMessageRemoved()
public boolean isMessageEdited()
public String getMessage()
public String getMessageEntryName()
public MessageEntry getMessageEntry()
public MessageEntry getReferencedMessageEntry()
public List<Document> getAttachementList()
public void execute() throws IfsException
This is called after first invoking preExecute
and before
invoking postExecute
.
execute
in class ActionAdapter
IfsException
- if the operation fails.Copyright © 2023. All rights reserved.