|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.ldap.util.NamespaceTools
public class NamespaceTools
Tools dealing with common Naming operations.
Constructor Summary | |
---|---|
NamespaceTools()
|
Method Summary | |
---|---|
static java.lang.String[] |
getCompositeComponents(java.lang.String compositeNameComponent)
Gets the '+' appended components of a composite name component. |
static java.lang.String |
getRdnAttribute(java.lang.String rdn)
Gets the attribute of a single attribute rdn or name component. |
static java.lang.String |
getRdnValue(java.lang.String rdn)
Gets the value of a single name component of a distinguished name. |
static DN |
getRelativeName(DN ancestor,
DN descendant)
Gets the relative name between an ancestor and a potential descendant. |
static boolean |
hasCompositeComponents(java.lang.String name)
Checks to see if a name has name complex name components in it. |
static java.lang.String |
inferLdapName(java.lang.String realm)
Uses the algorithm in RFC 2247 to infer an LDAP name from a Kerberos realm name or a DNS domain name. |
static boolean |
isDescendant(DN ancestor,
DN descendant)
Tests to see if a candidate entry is a descendant of a base. |
static boolean |
isSibling(DN name1,
DN name2)
Checks to see if two names are siblings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamespaceTools()
Method Detail |
---|
public static java.lang.String getRdnAttribute(java.lang.String rdn)
rdn
- the name component
public static java.lang.String getRdnValue(java.lang.String rdn)
rdn
- the name component to get the value from
public static boolean isSibling(DN name1, DN name2) throws LdapInvalidDnException
name1
- the first namename2
- the second name
LdapInvalidDnException
public static boolean isDescendant(DN ancestor, DN descendant)
ancestor
- the base ancestordescendant
- the candidate to test for descendancy
public static DN getRelativeName(DN ancestor, DN descendant) throws LdapInvalidDnException
ancestor
- the normalized distinguished name of the ancestor contextdescendant
- the normalized distinguished name of the descendant context
LdapInvalidDnException
- if the contexts are not related in the ancestual sensepublic static java.lang.String inferLdapName(java.lang.String realm)
realm
- the realm or domain name
public static java.lang.String[] getCompositeComponents(java.lang.String compositeNameComponent) throws LdapInvalidDnException
compositeNameComponent
- a single name component not a whole name
LdapInvalidDnException
- if nameComponent is invalid (starts with a +)public static boolean hasCompositeComponents(java.lang.String name) throws LdapInvalidDnException
name
- The name to check
true
if the name has composite components
LdapInvalidDnException
- If the name is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |