Interface MessageFactory


public interface MessageFactory
Factory interface for Message creation
Author:
Carl Wilson carlwilson AT github
  • Method Details

    • getMessage

      Message getMessage(String id, Message.Severity severity) throws NoSuchElementException
      Retrieve Message by unique persistent id and Severity
      Parameters:
      id - the String id of the Message to be retrieved
      severity - the the Message.Severity of the message
      Returns:
      the Message with persistent id equal to id
      Throws:
      NoSuchElementException - if no Message with id can be retrieved
    • getError

      Message getError(String id) throws NoSuchElementException
      Retrieve error Message by unique persistent id
      Parameters:
      id - the String 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
    • getFatal

      Message getFatal(String id) throws NoSuchElementException
      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

      Message getWarning(String id) throws NoSuchElementException
      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 retrieved
      severity - the the severity of the message
      args - 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

      Message getError(String id, Object... args) throws NoSuchElementException
      Retrieve error Message by unique persistent id and format with the given arguments
      Parameters:
      id - the id of the message to be retrieved
      args - 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

      Message getFatal(String id, Object... args) throws NoSuchElementException
      Retrieve error Message by unique persistent id and format with the given arguments
      Parameters:
      id - the id of the message to be retrieved
      args - 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

      Message getInfo(String id, Object... args) throws NoSuchElementException
      Retrieve info Message by unique persistent id and format with the given arguments
      Parameters:
      id - the id of the message to be retrieved
      args - 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

      Message getWarning(String id, Object... args) throws NoSuchElementException
      Retrieve warning Message by unique persistent id and format with the given arguments
      Parameters:
      id - the id of the message to be retrieved
      args - 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