Class MessageDefinition
java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.messagesets.MessageDefinition
- Direct Known Subclasses:
AuditLogMessageDefinition
,ExceptionMessageDefinition
MessageDefinition is a container that describes a single instance of a message.
It is in fact the superclass of a message for an exception and for the audit log
and as such, defines the values that are common to both. The concrete subclasses
have the additional fields relevant to their specific definition.
-
Constructor Summary
ConstructorDescriptionMessageDefinition
(String messageId, String messageTemplate, String systemAction, String userAction) Constructor to save all the fixed values of a message. -
Method Summary
Modifier and TypeMethodDescriptionReturn the unique identifier for the message.String[]
Return the array of values that apply to this message instance.Return the template of the message.Returns a description of the action taken by the system when the condition that caused this exception was detected.Returns instructions on what to do next, given that this situation has occurred.void
setMessageParameters
(String... params) Set up the specific values that apply to this message instance.toString()
JSON-style toString.
-
Constructor Details
-
MessageDefinition
public MessageDefinition(String messageId, String messageTemplate, String systemAction, String userAction) Constructor to save all the fixed values of a message. This is typically populated from an Enum message set.- Parameters:
messageId
- unique id of the message type.messageTemplate
- template for the message text with placeholders for parameters.systemAction
- description of the actions of the system when the situation arose.userAction
- instructions on what to do next.
-
-
Method Details
-
getMessageId
Return the unique identifier for the message.- Returns:
- string id
-
getMessageTemplate
Return the template of the message.- Returns:
- string message text with placeholders
-
setMessageParameters
Set up the specific values that apply to this message instance.- Parameters:
params
- list of string message inserts for the message template
-
getMessageParams
Return the array of values that apply to this message instance.- Returns:
- array of string message inserts for the message template
-
getSystemAction
Returns a description of the action taken by the system when the condition that caused this exception was detected.- Returns:
- systemAction String
-
getUserAction
Returns instructions on what to do next, given that this situation has occurred.- Returns:
- userAction String
-
toString
JSON-style toString.
-