congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RDN
Code IndexAdd Tabnine to your IDE (free)

How to use
RDN
in
com.novell.ldap.util

Best Java code snippets using com.novell.ldap.util.RDN (Showing top 11 results out of 315)

origin: com.novell.ldap/jldap

/**
 * Returns the individual components of a relative distinguished name
 * (RDN), normalized.
 *
 *  @param rdn     The relative distinguished name, or in other words,
 *                 the left-most component of a distinguished name.
 *<br><br>
 *  @param noTypes   If true, returns only the values of the
 *                  components, and not the names of the component, for
 *                  example "Babs Jensen" instead of "cn=Babs Jensen".
 *
 * @return An array of strings representing the individual components
 * of an RDN, or null if the RDN is not a valid RDN.
 */
public static String[] explodeRDN(String rdn, boolean noTypes) {
  RDN rdnToExplode = new RDN(rdn);
  return rdnToExplode.explodeRDN(noTypes);
}
origin: com.novell.ldap/jldap

/**
 * Compares this DN to the specified DN to determine if they are equal.
 *
 * @param   toDN the DN to compare to
 * @return  <code>true</code> if the DNs are equal; otherwise
 *          <code>false</code>
 */
public boolean equals( DN toDN ){
  int length = toDN.rdnList.size();
  if( this.rdnList.size() != length)
    return false;
  for(int i=0; i<length; i++){
    if (!((RDN)rdnList.get(i)).equals( (RDN)toDN.rdnList.get(i) ))
      return false;
  }
  return true;
}
origin: com.novell.ldap/jldap

/**
 * Creates a string that represents this RDN, according to RFC 2253
 *
 * @return An RDN string
 */
public String toString(){
  return toString(false);
}
origin: sakaiproject/sakai

Iterator<RDN> containerRDNsIterator = containerRDNs.iterator();
RDN rdn = containerRDNsIterator.next();
String mappedValue = mapRdn(rdn.getType(),rdn.getValue());
        mappedValue = mapRdn(rdn.getType(),rdn.getValue());
        if ( mappedValue != null) {
            return mappedValue;
origin: com.novell.ldap/jldap

String   rawValue = "";
int      hexDigitCount = 0;
RDN      currRDN = new RDN();
      dnString.substring(valueStart, currIndex-trailingSpaceCount);
    currRDN.add(attrType, attrValue, rawValue);
    if (currChar != '+'){
      rdnList.add(currRDN);
      currRDN = new RDN();
      currRDN.add(attrType, attrValue, rawValue);
      if (currChar != '+'){
        rdnList.add(currRDN);
        currRDN = new RDN();
        currRDN.add(attrType, attrValue, rawValue);
        if (currChar != '+'){
          rdnList.add(currRDN);
          currRDN = new RDN();
  rawValue =
    dnString.substring(valueStart, currIndex - trailingSpaceCount);
  currRDN.add(attrType,attrValue,rawValue);
  rdnList.add(currRDN);
  currRDN.add(attrType, attrValue, rawValue);
  rdnList.add(currRDN);
origin: com.novell.ldap/jldap

Identifier id = new Identifier();
try {
  id.setType(this.getIdentifierType(((RDN)dn.getRDNs().get(0)).getType()));
} catch (IllegalArgumentException e1) {
  throw new LDAPException("Could not determine type",53, e1.toString(), e1);
origin: com.novell.ldap/jldap

/**
 * Compares the RDN to the rdn passed.  Note: If an there exist any
 * mulivalues in one RDN they must all be present in the other.
 *
 * @param rdn the RDN to compare to
 *
 * @throws IllegalArgumentException if the application compares a name
 * with an OID.
 */
public boolean equals(RDN rdn){
  if (this.values.size() != rdn.values.size()){
    return false;
  }
  int j,i;
  for (i=0; i<this.values.size(); i++){
    //verify that the current value and type exists in the other list
    j=0;
    //May need a more intellegent compare
    while ( j<values.size() && (
        !((String)this.values.get(i)).equalsIgnoreCase(
         (String) rdn.values.get(j)) ||
        !equalAttrType((String)this.types.get(i),
                (String) rdn.types.get(j)))){
      j++;
    }
    if (j >= rdn.values.size()) //couldn't find first value
      return false;
  }
  return true;
}
origin: com.novell.ldap/jldap

  id.setType(this.getIdentifierType(rdn.getType()));
} catch (IllegalArgumentException e1) {
  throw new LDAPException("Could not determine type",53, e1.toString(), e1);
id.setId(rdn.getValue());
origin: com.novell.ldap/jldap

  id.setType(this.getIdentifierType(rdn.getType()));
} catch (IllegalArgumentException e1) {
  throw new LDAPException("Could not determine type",53, e1.toString(), e1);
id.setId(rdn.getValue());
origin: com.novell.ldap/jldap

/**
 * return a string array of the individual RDNs contained in the DN
 *
 * @param noTypes   If true, returns only the values of the
 *                  components, and not the names, e.g. "Babs
 *                  Jensen", "Accounting", "Acme", "us" - instead of
 *                  "cn=Babs Jensen", "ou=Accounting", "o=Acme", and
 *                  "c=us".
 * @return  <code>String[]</code> containing the rdns in the DN with
 *                 the leftmost rdn in the first element of the array
 *
 */
public String[] explodeDN(boolean  noTypes) {
  int length = rdnList.size();
  String[] rdns = new String[length];
  for(int i=0; i<length; i++)
    rdns[i]=((RDN)rdnList.get(i)).toString(noTypes);
  return rdns;
}
origin: com.novell.ldap/jldap

while ( !((RDN)this.rdnList.get(j--)).equals((RDN)containerDN.rdnList.get(i))){
  if (j <= 0)
    return false;
  if (!((RDN)this.rdnList.get(j)).equals(
    (RDN)containerDN.rdnList.get(i)))
    return false;
com.novell.ldap.utilRDN

Javadoc

A RDN encapsulates a single object's name of a Distinguished Name(DN). The object name represented by this class contains no context. Thus a Relative Distinguished Name (RDN) could be relative to anywhere in the Directories tree.

For example, of following DN, 'cn=admin, ou=marketing, o=corporation', all possible RDNs are 'cn=admin', 'ou=marketing', and 'o=corporation'.

Multivalued attributes are encapsulated in this class. For example the following could be represented by an RDN: 'cn=john + l=US', or 'cn=juan + l=ES'

Most used methods

  • getType
    Returns the type of this RDN. This method assumes that only one value is used, If multivalues attrib
  • getValue
    Returns the values of this RDN. If multivalues attributes are used only the first Type is returned.
  • <init>
    Creates an RDN object from the DN component specified in the string RDN
  • add
    Adds another value to the RDN. Only one attribute type is allowed for the RDN.
  • equalAttrType
    Internal function used by equal to compare Attribute types. Because attribute types could either be
  • equals
    Compares the RDN to the rdn passed. Note: If an there exist any mulivalues in one RDN they must all
  • explodeRDN
    Returns each multivalued name in the current RDN as an array of Strings.
  • toString
    Creates a string that represents this RDN. If noTypes is true then Atribute types will be ommited.

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • getSystemService (Context)
  • putExtra (Intent)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ImageIO (javax.imageio)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Table (org.hibernate.mapping)
    A relational table
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now