Class X2JMsgUtils

java.lang.Object
com.x2j.converter.utils.X2JMsgUtils

public class X2JMsgUtils extends Object
A single instance utility class that reads the error messages properties file (both out-of-the-box and extended files) and returns the messages as and when required.
  • Method Details

    • getInstance

      public static X2JMsgUtils getInstance()
      Returns the single instance of X2JMsgUtils.
      Returns:
      instance of X2JMsgUtils
    • reset

      public void reset() throws X2JException
      Reloads the messages object from the properties file.
      Throws:
      X2JException - X2JException
    • getMessage

      public String getMessage(String code)
      Returns the message for the given code.
      Parameters:
      code - the message code
      Returns:
      the message as defined/extended in the properties file
    • getMsgs

      public Properties getMsgs()
      Returns all the messages.
      Returns:
      the msgs