|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.directory.ldap.LDAPUtil
public class LDAPUtil
Provides utility and convenience methods for LDAP directory data.
| Field Summary | |
|---|---|
static java.lang.String |
DISTINGUISHED_NAME
The distinguished name identifier (i.e. |
static StringPattern |
ENCRYPTION_PATTERN
The pattern that an encrypted string usually matches (e.g. |
| Method Summary | |
|---|---|
java.lang.Object |
asEncryptedStringIfApplicable(java.lang.Object value)
Returns the given value as a String if it is a byte array containing an encrypted string. |
java.lang.String |
createTimestamp()
Creates an LDAP syntax compliant timestamp for the current date. |
java.lang.String |
createTimestamp(java.util.Date date)
Creates an LDAP syntax compliant timestamp for the given date. |
static LDAPUtil |
current()
Returns the only instance this class supports (design pattern "Singleton") |
java.lang.String |
encodeToBase64(java.lang.Object obj)
Encodes the given object to BASE64 encoding |
boolean |
needsEncoding(java.lang.Object value)
Returns true if the given value must be BASE64 encoding if used in a contex with limited character representation. |
java.lang.String |
normalizeDN(java.lang.String dn)
Removes all unnecessary spaces from the given DN. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DISTINGUISHED_NAME
public static final StringPattern ENCRYPTION_PATTERN
| Method Detail |
|---|
public static LDAPUtil current()
public java.lang.String normalizeDN(java.lang.String dn)
Example:
normalizeDN( "cn= Peter Pan, ou=people, dcx = examples , dc=com " )
==> "cn=Peter Pan,ou=people,dcx=examples,dc=com"
dn - The dn to remove the spaces frompublic boolean needsEncoding(java.lang.Object value)
public java.lang.Object asEncryptedStringIfApplicable(java.lang.Object value)
public java.lang.String encodeToBase64(java.lang.Object obj)
public java.lang.String createTimestamp(java.util.Date date)
date - The date to convert to an LDAP timestamp stringpublic java.lang.String createTimestamp()
createTimestamp(Date)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||