Class FormatDnResolver

  • All Implemented Interfaces:
    DnResolver

    public class FormatDnResolver
    extends java.lang.Object
    implements DnResolver
    Returns a DN by applying a formatter. See Formatter.
    Author:
    Middleware Services
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger logger
      log for this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      FormatDnResolver()
      Default constructor.
      FormatDnResolver​(java.lang.String format)
      Creates a new format DN resolver.
      FormatDnResolver​(java.lang.String format, java.lang.Object[] args)
      Creates a new format DN resolver with the supplied format and arguments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getEscapeUser()
      Returns whether the user input will be escaped using attributeValueEscaper.
      java.lang.String getFormat()
      Returns the formatter string used to return the entry DN.
      java.lang.Object[] getFormatArgs()
      Returns the format arguments.
      java.lang.String resolve​(User user)
      Returns a DN for the supplied user by applying it to a format string.
      void setEscapeUser​(boolean b)
      Sets whether the user input will be escaped using attributeValueEscaper.
      void setFormat​(java.lang.String format)
      Sets the formatter string used to return the entry DN.
      void setFormatArgs​(java.lang.Object[] args)
      Sets the format arguments.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
        log for this class.
    • Constructor Detail

      • FormatDnResolver

        public FormatDnResolver()
        Default constructor.
      • FormatDnResolver

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

        public FormatDnResolver​(java.lang.String format,
                                java.lang.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 java.lang.String getFormat()
        Returns the formatter string used to return the entry DN.
        Returns:
        user field
      • setFormat

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

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

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

        public boolean getEscapeUser()
        Returns whether the user input will be escaped using attributeValueEscaper.
        Returns:
        whether the user input will be escaped.
      • setEscapeUser

        public void setEscapeUser​(boolean b)
        Sets whether the user input will be escaped using attributeValueEscaper.
        Parameters:
        b - whether the user input will be escaped.
      • resolve

        public java.lang.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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object