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

Examples of org.apache.directory.shared.ldap.name.LdapDN.normalize()


            while ( subentries.next() )
            {
                ServerEntry candidate = subentries.get();
                LdapDN dn = candidate.getDn();
                dn.normalize( atRegistry.getNormalizerMapping() );

                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                {
                    nexus.modify( new ModifyOperationContext( opContext.getSession(), dn,
                        getOperationalModsForReplace( oriChildName, newName, subentry, candidate ) ) );
View Full Code Here


        LdapDN newUpdn = ( LdapDN ) updn.clone(); // copy da old updn
        newUpdn.remove( newUpdn.size() - 1 ); // remove old upRdn
        newUpdn.add( newRdn.getUpName() ); // add da new upRdn

        // gotta normalize cuz this thang is cloned and not normalized by default
        newUpdn.normalize( attributeTypeRegistry.getNormalizerMapping() );

        modifyDn( id, newUpdn, false ); // propagate dn changes

        // Update the current entry
        entry.setDn( newUpdn );
View Full Code Here

            // calculate the new DN now for use below to modify subentry operational
            // attributes contained within this regular entry with name changes
            LdapDN newName = ( LdapDN ) parent.clone();
            newName.add( opContext.getNewRdn() );
            newName.normalize( atRegistry.getNormalizerMapping() );
            List<Modification> mods = getModsOnEntryRdnChange( oriChildName, newName, entry );

            if ( mods.size() > 0 )
            {
                nexus.modify( new ModifyOperationContext( opContext.getSession(), newName, mods ) );
View Full Code Here

            LdapDN childUpdn = ( LdapDN ) updn.clone();
            LdapDN oldUpdn = new LdapDN( getEntryUpdn( childId ) );

            String rdn = oldUpdn.get( oldUpdn.size() - 1 );
            LdapDN rdnDN = new LdapDN( rdn );
            rdnDN.normalize( attributeTypeRegistry.getNormalizerMapping() );
            childUpdn.add( rdnDN.getRdn() );

            // Modify the child
            ServerEntry entry = lookup( childId );
            entry.setDn( childUpdn );
View Full Code Here

            while ( subentries.next() )
            {
                ServerEntry candidate = subentries.get();
                LdapDN dn = candidate.getDn();
                dn.normalize( atRegistry.getNormalizerMapping() );

                if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                {
                    nexus.modify( new ModifyOperationContext( opContext.getSession(), dn,
                        getOperationalModsForReplace( oriChildName, newName, subentry, candidate ) ) );
View Full Code Here


    private LdapDN parseNormalized( String name ) throws NamingException
    {
        LdapDN dn = new LdapDN( name );
        dn.normalize( normalizerMap );
        return dn;
    }


    private void initialize( CoreSession session ) throws Exception
View Full Code Here

            while ( subentries.next() )
            {
                ServerEntry candidate = subentries.get();
                LdapDN dn = candidate.getDn();
                dn.normalize( atRegistry.getNormalizerMapping() );

                if ( evaluator.evaluate( ssOld, apName, dn, candidate ) )
                {
                    nexus.modify( new ModifyOperationContext( opContext.getSession(), dn,
                        getOperationalModsForRemove( name, candidate ) ) );
View Full Code Here

           
            while ( subentries.next() )
            {
                ServerEntry candidate = subentries.get();
                LdapDN dn = candidate.getDn();
                dn.normalize( atRegistry.getNormalizerMapping() );

                if ( evaluator.evaluate( ssNew, apName, dn, candidate ) )
                {
                    nexus.modify( new ModifyOperationContext( opContext.getSession(), dn,
                        getOperationalModsForAdd( candidate, operational ) ) );
View Full Code Here

            {
                return !objectClasses.contains( SchemaConstants.SUBENTRY_OC );
            }

            LdapDN ndn = new LdapDN( dn );
            ndn.normalize( atRegistry.getNormalizerMapping() );
            String normalizedDn = ndn.toString();
            return !subentryCache.hasSubentry( normalizedDn );
        }
    }
View Full Code Here

            {
                return objectClasses.contains( SchemaConstants.SUBENTRY_OC );
            }

            LdapDN ndn = new LdapDN( dn );
            ndn.normalize( atRegistry.getNormalizerMapping() );
            return subentryCache.hasSubentry( ndn.toNormName() );
        }
    }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.