Package org.passay

Class PropertiesMessageResolver

  • All Implemented Interfaces:
    MessageResolver

    public class PropertiesMessageResolver
    extends AbstractMessageResolver
    Resolves messages from rule result details from a properties file. The default properties file is loaded from the classpath, see DEFAULT_MESSAGE_PATH.
    Author:
    Middleware Services
    • Field Detail

      • DEFAULT_MESSAGE_PATH

        public static final String DEFAULT_MESSAGE_PATH
        Classpath location of default message map.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PropertiesMessageResolver

        public PropertiesMessageResolver()
        Creates a new message resolver with the default message map.
      • PropertiesMessageResolver

        public PropertiesMessageResolver​(Properties properties)
        Creates a new message resolver with the supplied message map.
        Parameters:
        properties - map of keys to messages.
    • Method Detail

      • getDefaultProperties

        public static Properties getDefaultProperties()
        Returns the default mapping of message keys to message strings.
        Returns:
        default message mapping.