|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.ldap.util.DistinguishedName
public class DistinguishedName
This class represents a distinguished name. The underlying implementation uses clases in Sun's LDAP provider which is based on RFC 2253.
| Field Summary |
|---|
| Fields inherited from interface javax.naming.Name |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
DistinguishedName(java.lang.String dnString)Constructs a Distinguished Name from the given DN value |
|
| Method Summary | |
|---|---|
javax.naming.Name |
add(int posn, java.lang.String comp)Adds a single component at a specified position within this name. |
javax.naming.Name |
add(java.lang.String comp)Adds a single component to the end of this name. |
javax.naming.Name |
addAll(int posn, javax.naming.Name n)Adds the components of a name (in order) at a specified position within this name. |
javax.naming.Name |
addAll(javax.naming.Name suffix)Adds the components of a name (in order) to the end of this name |
java.lang.Object |
clone()Creates a clone of this Distinguished Name. |
int |
compareTo(java.lang.Object obj)Compares this Distinguished Name with the specified Object for order. |
boolean |
endsWith(javax.naming.Name n)Determines whether this name ends with a specified suffix. |
boolean |
equals(java.lang.Object obj)Determines whether two distinguished names are equal. |
java.lang.String |
get(int posn)Retrieves a component of this name |
java.util.Enumeration |
getAll()Retrieves the componnets of this name as an enumeration of Strings. |
javax.naming.ldap.LdapName |
getLdapName()Returns an LdapName equivalent to this name |
java.lang.String |
getNormalizedDN()Returns the normalized version of this name. |
DistinguishedName |
getParentDN()Returns the parent of this distinguished name. |
javax.naming.Name |
getPrefix(int posn)Creates a name whose components consist of a prefix of the components of this name. |
DistinguishedName |
getRDN()Returns the RDN portion of this distinguished name. |
javax.naming.Name |
getSuffix(int posn)Creates a name whose components consist of a suffix of the components in this name. |
boolean |
isEmpty()Determines whether this name is empty. |
static void |
main(java.lang.String[] args) |
java.lang.Object |
remove(int posn)Removes a component from this name. |
int |
size()Returns the number of components in this name. |
boolean |
startsWith(javax.naming.Name n)Determines whether this name starts with a specified prefix. |
java.lang.String |
toString()Returns the string representation of this name. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DistinguishedName(java.lang.String dnString)
throws javax.naming.InvalidNameException
dnString - the DN valuejavax.naming.InvalidNameException - if syntax error is encountered| Method Detail |
|---|
public java.lang.Object clone()
clone in interface javax.naming.Nameclone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the possibly null object to compare against.public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparable<java.lang.Object>compareTo in interface javax.naming.Nameobj - the non-null object to compare againstjava.lang.ClassCastException - if obj is not a Name of a type that may be compared with this namepublic int size()
size in interface javax.naming.Namepublic boolean isEmpty()
isEmpty in interface javax.naming.Namepublic java.util.Enumeration getAll()
getAll in interface javax.naming.Namepublic java.lang.String get(int posn)
get in interface javax.naming.Nameposn - the 0-based index of the component to retrieve. Must be in the range [0,size()].java.lang.ArrayIndexOutOfBoundsException - if posn is outside the specified rangepublic javax.naming.Name getPrefix(int posn)
getPrefix in interface javax.naming.Nameposn - the 0-based index of the component to retrieve. Must be in the range [0,size()).public javax.naming.Name getSuffix(int posn)
getSuffix in interface javax.naming.Nameposn - the 0-based index of the component at which to start. Must be in the range [0,size()].public boolean startsWith(javax.naming.Name n)
startsWith in interface javax.naming.Namen - the name to check.public boolean endsWith(javax.naming.Name n)
endsWith in interface javax.naming.Namen - the name to check
public javax.naming.Name addAll(javax.naming.Name suffix)
throws javax.naming.InvalidNameException
addAll in interface javax.naming.Namesuffix - the components to addjavax.naming.InvalidNameException - if suffix is not a valid name, or if the addition of the components would violate the syntax rules of this name
public javax.naming.Name addAll(int posn,
javax.naming.Name n)
throws javax.naming.InvalidNameException
addAll in interface javax.naming.Namen - the components to addposn - the index in this name at which to add the new components. Must be in the range [0,size()].java.lang.ArrayIndexOutOfBoundsException - if posn is ouside of the specified range.javax.naming.InvalidNameException - if n is not valid name, or if the addtion of the components would violate the syntax rules of this name.
public javax.naming.Name add(java.lang.String comp)
throws javax.naming.InvalidNameException
add in interface javax.naming.Namecomp - the component to addjavax.naming.InvalidNameException - if adding comp would violate the syntax rules of this name
public javax.naming.Name add(int posn,
java.lang.String comp)
throws javax.naming.InvalidNameException
add in interface javax.naming.Namecomp - the component to addposn - the index at which to add the new component. Must be in the range [0,size()].java.lang.ArrayIndexOutOfBoundsException - if posn is ouside of the specified range.javax.naming.InvalidNameException - if n is not valid name, or if the addtion of the components would violate the syntax rules of this name.
public java.lang.Object remove(int posn)
throws javax.naming.InvalidNameException
remove in interface javax.naming.Nameposn - the index of the component to remove. Must be in the range [0,size()).java.lang.ArrayIndexOutOfBoundsException - if posn is ouside of the specified range.javax.naming.InvalidNameException - if deleting the component would violate the syntax rules of this name.public java.lang.String getNormalizedDN()
public DistinguishedName getParentDN()
throws javax.naming.InvalidNameException
javax.naming.InvalidNameException
public DistinguishedName getRDN()
throws javax.naming.InvalidNameException
javax.naming.InvalidNameExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic javax.naming.ldap.LdapName getLdapName()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
Oracle Internet Directory API Reference 11g Release 1 (11.1.1) E10664-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||