Package org.openpreservation.messages
Interface MessageFactory
public interface MessageFactory
Factory interface for
Message
creation- Author:
- Carl Wilson carlwilson AT github
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve errorMessage
by unique persistent idRetrieve error Message by unique persistent id and format with the given argumentsRetrieve fatal Message by unique persistent idRetrieve error Message by unique persistent id and format with the given argumentsRetrieve info Message by unique persistent idRetrieve info Message by unique persistent id and format with the given argumentsgetMessage
(String id, Message.Severity severity) RetrieveMessage
by unique persistent id andSeverity
getMessage
(String id, Message.Severity severity, Object... args) Retrieve Message by unique persistent id and format with the given argumentsgetWarning
(String id) Retrieve warning Message by unique persistent idgetWarning
(String id, Object... args) Retrieve warning Message by unique persistent id and format with the given arguments
-
Method Details
-
getMessage
RetrieveMessage
by unique persistent id andSeverity
- Parameters:
id
- theString
id of theMessage
to be retrievedseverity
- the theMessage.Severity
of the message- Returns:
- the
Message
with persistent id equal toid
- Throws:
NoSuchElementException
- if noMessage
withid
can be retrieved
-
getError
Retrieve errorMessage
by unique persistent id- Parameters:
id
- theString
id of the message to be retrieved- Returns:
- the
message
with persistent id equal toid
- Throws:
NoSuchElementException
- if noMessage
withid
can be retrieved
-
getFatal
Retrieve fatal Message by unique persistent id- Parameters:
id
- the id of the message to be retrieved- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getInfo
Retrieve info Message by unique persistent id- Parameters:
id
- the id of the message to be retrieved- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getWarning
Retrieve warning Message by unique persistent id- Parameters:
id
- the id of the message to be retrieved- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getMessage
Message getMessage(String id, Message.Severity severity, Object... args) throws NoSuchElementException Retrieve Message by unique persistent id and format with the given arguments- Parameters:
id
- the id of the message to be retrievedseverity
- the the severity of the messageargs
- the arguments to be used in formatting the message- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getError
Retrieve error Message by unique persistent id and format with the given arguments- Parameters:
id
- the id of the message to be retrievedargs
- the arguments to be used in formatting the message- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getFatal
Retrieve error Message by unique persistent id and format with the given arguments- Parameters:
id
- the id of the message to be retrievedargs
- the arguments to be used in formatting the message- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getInfo
Retrieve info Message by unique persistent id and format with the given arguments- Parameters:
id
- the id of the message to be retrievedargs
- the arguments to be used in formatting the message- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-
getWarning
Retrieve warning Message by unique persistent id and format with the given arguments- Parameters:
id
- the id of the message to be retrievedargs
- the arguments to be used in formatting the message- Returns:
- the message with persistent id equal to id
- Throws:
NoSuchElementException
- if no message with id can be retrieved
-