public class FormatDnResolver extends Object implements DnResolver
Formatter
.Modifier and Type | Field and Description |
---|---|
private boolean |
escapeUser
whether to escape the user input.
|
private Object[] |
formatArgs
format arguments.
|
private String |
formatString
format of DN.
|
protected Logger |
logger
log for this class.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(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.
|
void |
setFormat(String format)
Sets the formatter string used to return the entry DN.
|
void |
setFormatArgs(Object[] args)
Sets the format arguments.
|
String |
toString() |
protected final Logger logger
private String formatString
private Object[] formatArgs
private boolean escapeUser
public FormatDnResolver()
public FormatDnResolver(String format)
format
- formatter stringpublic String getFormat()
public void setFormat(String format)
format
- formatter stringpublic Object[] getFormatArgs()
public void setFormatArgs(Object[] args)
args
- to set format argumentspublic boolean getEscapeUser()
LdapAttribute.escapeValue(String)
.public void setEscapeUser(boolean b)
LdapAttribute.escapeValue(String)
.b
- whether the user input will be escaped.public String resolve(User user) throws LdapException
resolve
in interface DnResolver
user
- to format dn forLdapException
- neverCopyright © 2003-2019 Virginia Tech. All Rights Reserved.