org.ldaptive.auth
Class FormatDnResolver

java.lang.Object
  extended by org.ldaptive.auth.FormatDnResolver
All Implemented Interfaces:
DnResolver

public class FormatDnResolver
extends Object
implements DnResolver

Returns a DN by applying a formatter. See Formatter.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
protected  org.slf4j.Logger logger
          log for this class.
 
Constructor Summary
FormatDnResolver()
          Default constructor.
FormatDnResolver(String format)
          Creates a new format DN resolver.
FormatDnResolver(String format, Object[] args)
          Creates a new format DN resolver with the supplied format and arguments.
 
Method Summary
 boolean getEscapeUser()
          Returns whether the user input will be escaped.
 String getFormat()
          Returns the formatter string used to return the entry DN.
 Object[] getFormatArgs()
          Returns the format arguments.
 String resolve(String 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.
 void setFormat(String format)
          Sets the formatter string used to return the entry DN.
 void setFormatArgs(Object[] args)
          Sets the format arguments.
 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(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(String 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 String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.