Package org.apache.directory.shared.ldap.name

Examples of org.apache.directory.shared.ldap.name.DN


    /**
     * @see javax.naming.Context#composeName(java.lang.String, java.lang.String)
     */
    public String composeName( String name, String prefix ) throws NamingException
    {
        return composeName( new DN( name ), new DN( prefix ) ).toString();
    }
View Full Code Here


    }


    public void addNamingListener( String name, int scope, NamingListener namingListener ) throws NamingException
    {
        addNamingListener( new DN( name ), scope, namingListener );
    }
View Full Code Here

     * @throws InvalidNameException if relativeName is not a valid name in
     *      the LDAP namespace.
     */
    DN buildTarget( Name relativeName ) throws InvalidNameException
    {
        DN target = ( DN ) dn.clone();

        // Add to left hand side of cloned DN the relative name arg
        target.addAllNormalized( target.size(), relativeName );
        return target;
    }
View Full Code Here

        // JNDI issue: must use the name object here rather then string,
        // otherwise more backslashes are needed
        // works with both javax.naming.ldap.LdapName or
        // org.apache.directory.shared.ldap.name.DN
        DN ldapRdn = new DN( rdn );
        ctx.createSubcontext( ldapRdn, attrs );

        SearchControls sctls = new SearchControls();
        sctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
View Full Code Here

        // JNDI issue: must use the name object here rather then string,
        // otherwise more backslashes are needed
        // works with both javax.naming.ldap.LdapName or
        // org.apache.directory.shared.ldap.name.DN
        DN ldapRdn = new DN( rdn );
        ctx.createSubcontext( ldapRdn, attrs );

        SearchControls sctls = new SearchControls();
        sctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
View Full Code Here

            System.out.println( "Adding entry " + dn );
        }

        Entry entry = ldifEntry.getEntry();

        addRequest.setEntryDn( new DN( dn ) );

        // Copy the attributes
        for ( EntryAttribute attribute:entry )
        {
            addRequest.addAttributeType( attribute.getId() );
View Full Code Here

        if ( isDebugEnabled() )
        {
            System.out.println( "Deleting entry " + dn );
        }

        delRequest.setEntry( new DN( dn ) );

        delRequest.setMessageId( messageId );

        // Encode and send the delete request
        ByteBuffer bb = delRequest.encode();
View Full Code Here

        if ( isDebugEnabled() )
        {
            System.out.println( "Modify DN of entry " + dn );
        }

        modifyDNRequest.setEntry( new DN( dn ) );
        modifyDNRequest.setDeleteOldRDN( entry.isDeleteOldRdn() );
        modifyDNRequest.setNewRDN( new RDN( entry.getNewRdn() ) );

        if ( StringTools.isEmpty( entry.getNewSuperior() ) == false )
        {
            modifyDNRequest.setNewSuperior( new DN( entry.getNewSuperior() ) );
        }

        modifyDNRequest.setMessageId( messageId );

        // Encode and send the delete request
View Full Code Here

        if ( isDebugEnabled() )
        {
            System.out.println( "Modify of entry " + dn );
        }

        modifyRequest.setObject( new DN( dn ) );
        modifyRequest.initModifications();

        for ( Modification modification: entry.getModificationItems() )
        {
            modifyRequest.setCurrentOperation( modification.getOperation() );
View Full Code Here

            authentication = new SimpleAuthentication();
            ( ( SimpleAuthentication ) authentication ).setSimple( StringTools.getBytesUtf8( password ) );
        }

        bindRequest.setAuthentication( authentication );
        bindRequest.setName( new DN( user ) );
        bindRequest.setVersion( 3 );

        bindRequest.setMessageId( messageId );

        // Encode and send the bind request
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.name.DN

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.