Package org.apache.directory.api.ldap.model.name

Examples of org.apache.directory.api.ldap.model.name.Dn


            return resp;
        }

        try
        {
            Dn newRdn = null;

            if ( modDnRequest.getNewRdn() != null )
            {
                newRdn = new Dn( schemaManager, modDnRequest.getNewRdn().getName() );
            }

            Dn oldRdn = new Dn( schemaManager, modDnRequest.getName().getRdn().getName() );

            boolean rdnChanged = modDnRequest.getNewRdn() != null
                && !newRdn.getNormName().equals( oldRdn.getNormName() );

            if ( rdnChanged )
            {
                if ( modDnRequest.getNewSuperior() != null )
                {
View Full Code Here


            String msg = "Cannot process a move to a null Dn";
            LOG.debug( msg );
            throw new IllegalArgumentException( msg );
        }

        move( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newSuperiorDn ) );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
    {
        rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ), deleteOldRdn );
    }
View Full Code Here

            String msg = "Cannot process a rename with a null Rdn";
            LOG.debug( msg );
            throw new IllegalArgumentException( msg );
        }

        rename( new Dn( schemaManager, entryDn ), new Rdn( newRdn ) );
    }
View Full Code Here

     *
     * @see #moveAndRename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn, boolean)
     */
    public void moveAndRename( String entryDn, String newDn ) throws LdapException
    {
        moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), true );
    }
View Full Code Here

     * @param newDn The new Entry Dn
     * @param deleteOldRdn Tells if the old Rdn must be removed
     */
    public void moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
    {
        moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), deleteOldRdn );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public EntryCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
        throws LdapException
    {
        return search( new Dn( schemaManager, baseDn ), filter, scope, attributes );
    }
View Full Code Here

                List<Dn> searchContexts = new ArrayList<Dn>();
                Attribute attr = configEntry.get( "classLoaderDefaultSearchContext" );

                for ( Value<?> val : attr )
                {
                    Dn dn = directoryService.getDnFactory().create( val.getString() );
                    searchContexts.add( dn );
                }

                try
                {
                    classBytes = findClassInDIT( searchContexts, name );

                    LOG.debug( "Class " + name + " found under default search contexts." );
                }
                catch ( ClassNotFoundException e )
                {
                    LOG.debug( "Class " + name + " could not be found under default search contexts." );
                }
            }

            if ( classBytes == null )
            {
                List<Dn> namingContexts = new ArrayList<Dn>();

                Set<String> suffixes = directoryService.getPartitionNexus().listSuffixes();

                for ( String suffix : suffixes )
                {
                    Dn dn = directoryService.getDnFactory().create( suffix );
                    namingContexts.add( dn );
                }

                classBytes = findClassInDIT( namingContexts, name );
            }
View Full Code Here

        AttributeType storeProcUnitNamAT = session.getDirectoryService()
            .getSchemaManager().lookupAttributeTypeRegistry( "storedProcUnitName" );
        ExprNode filter = new EqualityNode<String>( storeProcUnitNamAT,
            new StringValue( storeProcUnitNamAT, spUnitName ) );
        Dn dn = session.getDirectoryService().getDnFactory().create( storedProcContainer );
        Cursor<Entry> results = session.search( dn, SearchScope.SUBTREE, filter,
            AliasDerefMode.DEREF_ALWAYS );
       
        if ( results.first() )
        {
View Full Code Here

        store.setSyncOnWrite( false );

        store.addIndex( new AvlIndex<String>( SchemaConstants.OU_AT_OID ) );
        store.addIndex( new AvlIndex<String>( SchemaConstants.CN_AT_OID ) );
        store.addIndex( new AvlIndex<String>( SchemaConstants.POSTALCODE_AT_OID ) );
        ( ( Partition ) store ).setSuffixDn( new Dn( schemaManager, "o=Good Times Co." ) );
        ( ( Partition ) store ).initialize();

        ( ( Partition ) store ).initialize();

        StoreUtils.loadExampleData( store, schemaManager );
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.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.