Package org.openpreservation.messages
Interface Message
public interface Message
Defines behaviour of validation messages.
These messages have a unique string identifier as well as
the previous message and sub-message strings.
- Author:
- Carl Wilson carlwilson AT github
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
An enum set that defines the severity of a message. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Get the unique, persistent message identifier.Get the main messageGet the message severityGet the sub-messageGet the message timestampboolean
Test whether the message has a sub-messageboolean
isError()
Test whether the message hasMessage.Severity
ERROR.boolean
isFatal()
Test whether the message hasMessage.Severity
FATAL.boolean
isInfo()
Test whether the message hasMessage.Severity
INFO.boolean
Test whether the message hasMessage.Severity
WARNING.
-
Method Details
-
getId
String getId()Get the unique, persistent message identifier.- Returns:
- the
String
message id.
-
getTimestamp
Date getTimestamp()Get the message timestamp- Returns:
- the
Date
timestamp of the message, ornull
if not set
-
getSeverity
Message.Severity getSeverity()Get the message severity- Returns:
- the
Message.Severity
of the message
-
getMessage
String getMessage()Get the main message- Returns:
- the
String
message
-
hasSubMessage
boolean hasSubMessage()Test whether the message has a sub-message- Returns:
true
if the message has a sub-message,false
otherwise
-
getSubMessage
String getSubMessage()Get the sub-message- Returns:
- the
String
sub-message
-
isError
boolean isError()Test whether the message hasMessage.Severity
ERROR.- Returns:
true
if the message hasSeverity.ERROR
,false
otherwise
-
isFatal
boolean isFatal()Test whether the message hasMessage.Severity
FATAL.- Returns:
true
if the message hasSeverity.FATAL
,false
otherwise
-
isInfo
boolean isInfo()Test whether the message hasMessage.Severity
INFO.- Returns:
true
if the message hasSeverity.INFO
,false
otherwise
-
isWarning
boolean isWarning()Test whether the message hasMessage.Severity
WARNING.- Returns:
true
if the message hasSeverity.WARNING
,false
otherwise
-