Enum JhoveMessages

    • Enum Constant Detail

    • Method Detail

      • values

        public static JhoveMessages[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JhoveMessages c : JhoveMessages.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JhoveMessages valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getMessageInstance

        public static JhoveMessage getMessageInstance​(String id,
                                                      String message)
                                               throws IllegalArgumentException
        Create a JhoveMessage instance with the give id and message value
        Parameters:
        id - the id of the new message
        message - the message of the new message
        Returns:
        the new message instance
        Throws:
        IllegalArgumentException - if the id or message is null or empty
      • getMessageInstance

        public static JhoveMessage getMessageInstance​(String id,
                                                      String message,
                                                      String subMessage)
                                               throws IllegalArgumentException
        Create a new JhoveMessage instance with the given id, message and sub-message
        Parameters:
        id - the id of the new message
        message - the message of the new message
        subMessage - the sub-message of the new message
        Returns:
        the new message instance
        Throws:
        IllegalArgumentException - if the id or message is null or empty
      • getInstance

        public static JhoveMessageFactory getInstance​(String bundleName)
                                               throws IllegalArgumentException
        Get a JhoveMessageFactory instance with the requested property based bundle name and the default user locale
        Parameters:
        bundleName - the fully qualified resource path for the message bundle property file
        Returns:
        a new JhoveMessageFactory instance backed by the bundle property file.
        Throws:
        IllegalArgumentException - if the bundle name is empty or the message bundle can't be located
      • getInstance

        public static JhoveMessageFactory getInstance​(String bundleName,
                                                      Locale locale)
                                               throws IllegalArgumentException
        Get a JhoveMessageFactory instance with the requested property based bundle name and a specific locale
        Parameters:
        bundleName - the fully qualified resource path for the message bundle property file
        locale - the locale for the message bundle
        Returns:
        a new JhoveMessageFactory instance backed by the bundle property file.
        Throws:
        IllegalArgumentException - if the bundle name is empty or the message bundle can't be located