Class FormatDnResolver

    • Field Detail

      • logger

        protected final Logger logger
        log for this class.
      • formatString

        private String formatString
        format of DN.
      • formatArgs

        private Object[] formatArgs
        format arguments.
      • escapeUser

        private boolean escapeUser
        whether to escape the user input.
    • Constructor Detail

      • FormatDnResolver

        public FormatDnResolver()
        Default constructor.
      • FormatDnResolver

        public FormatDnResolver​(String format)
        Creates a new format DN resolver.
        Parameters:
        format - formatter string
      • FormatDnResolver

        public FormatDnResolver​(String format,
                                Object[] args)
        Creates a new format DN resolver with the supplied format and arguments.
        Parameters:
        format - to set formatter string
        args - to set formatter arguments
    • Method Detail

      • getFormat

        public String getFormat()
        Returns the formatter string used to return the entry DN.
        Returns:
        user field
      • setFormat

        public void setFormat​(String format)
        Sets the formatter string used to return the entry DN.
        Parameters:
        format - formatter string
      • getFormatArgs

        public Object[] getFormatArgs()
        Returns the format arguments.
        Returns:
        format args
      • setFormatArgs

        public void setFormatArgs​(Object[] args)
        Sets the format arguments.
        Parameters:
        args - to set format arguments
      • getEscapeUser

        public boolean getEscapeUser()
        Returns whether the user input will be escaped. See LdapAttribute.escapeValue(String).
        Returns:
        whether the user input will be escaped.
      • setEscapeUser

        public void setEscapeUser​(boolean b)
        Sets whether the user input will be escaped. See LdapAttribute.escapeValue(String).
        Parameters:
        b - whether the user input will be escaped.
      • resolve

        public String resolve​(User user)
                       throws LdapException
        Returns a DN for the supplied user by applying it to a format string.
        Specified by:
        resolve in interface DnResolver
        Parameters:
        user - to format dn for
        Returns:
        user DN
        Throws:
        LdapException - never