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

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


                ( ( OrNode ) filter ).addNode( uuidEqNode );
            }
        }

        LdapDN dn = new LdapDN( config.getBaseDn() );
        dn.normalize( schemaManager.getNormalizerMapping() );

        EntryFilteringCursor cursor = session.search( dn, SearchScope.SUBTREE, filter, AliasDerefMode.NEVER_DEREF_ALIASES, new HashSet() );
   
        while( cursor.next() )
        {
View Full Code Here


        }

        try
        {
            LdapDN dn = new LdapDN( SchemaConstants.OU_AT + "=schema" );
            dn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );

            if ( !hasEntry( dn ) )
            {
                ServerEntry entry = new DefaultServerEntry( registries, dn );
                entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
View Full Code Here

        LdapDN dn = staticNormalizersDNs.get( schema.getSchemaName() );
       
        if ( dn == null )
        {
            dn = new LdapDN( "ou=normalizers,cn=" + schema.getSchemaName() + ",ou=schema" );
            dn.normalize( atRegistry.getNormalizerMapping() );
            staticNormalizersDNs.put( schema.getSchemaName(), dn );
        }
       
        if ( ! partition.hasEntry( new EntryOperationContext( null, dn ) ) )
        {
View Full Code Here

       
        while ( list.next() )
        {
            ClonedServerEntry result = list.get();
            LdapDN resultDN = result.getDn();
            resultDN.normalize( atRegistry.getNormalizerMapping() );
            ServerEntry attrs = lookupPartition( resultDN );
            Normalizer normalizer = factory.getNormalizer( attrs, targetRegistries );
            NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), attrs );
            targetRegistries.getNormalizerRegistry().register( normalizerDescription, normalizer );
        }
View Full Code Here

        LdapDN dn = staticComparatorsDNs.get( schema.getSchemaName() );
       
        if ( dn == null )
        {
            dn = new LdapDN( "ou=comparators,cn=" + schema.getSchemaName() + ",ou=schema" );
            dn.normalize( atRegistry.getNormalizerMapping() );
            staticComparatorsDNs.put( schema.getSchemaName(), dn );
        }

        if ( ! partition.hasEntry( new EntryOperationContext( null, dn ) ) )
        {
View Full Code Here

       
        while ( list.next() )
        {
            ClonedServerEntry result = list.get();
            LdapDN resultDN = result.getDn();
            resultDN.normalize( atRegistry.getNormalizerMapping() );
            ClonedServerEntry attrs = lookupPartition( resultDN );
            Comparator comparator = factory.getComparator( attrs, targetRegistries );
            ComparatorDescription comparatorDescription = getComparatorDescription( schema.getSchemaName(), attrs );
            targetRegistries.getComparatorRegistry().register( comparatorDescription, comparator );
        }
View Full Code Here

        serverEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );

        LdapDN newDn = ( LdapDN ) opContext.getDn().clone();
        newDn.remove( opContext.getDn().size() - 1 );
        newDn.add( opContext.getNewRdn() );
        newDn.normalize( atRegistry.getNormalizerMapping() );
       
        List<Modification> items = ModifyOperationContext.createModItems( serverEntry, ModificationOperation.REPLACE_ATTRIBUTE );

        ModifyOperationContext newModify = new ModifyOperationContext( opContext.getSession(), newDn, items );
       
View Full Code Here

                EntryAttribute attr = configEntry.get( "classLoaderDefaultSearchContext" );
               
                for ( Value<?> val : attr )
                {
                    LdapDN dn = new LdapDN( val.getString() );
                    dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
                    searchContexts.add( dn );
                }
               
                try
                {
View Full Code Here

                        new ListSuffixOperationContext( directoryService.getAdminSession() ) );

                for ( String suffix:suffixes )
                {
                    LdapDN dn = new LdapDN( suffix );
                    dn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
                    namingContexts.add( dn );
                }
               
                classBytes = findClassInDIT( namingContexts, name );
            }
View Full Code Here

                    new ClientStringValue( ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC ) );
            SearchControls ctls = new SearchControls();
            ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
           
            LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
            adminDn.normalize( directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping() );
            CoreSession adminSession = new DefaultCoreSession(
                new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), directoryService );
            EntryFilteringCursor results = nexus.search( new SearchOperationContext(
                adminSession, baseDn, AliasDerefMode.DEREF_ALWAYS, filter, ctls ) );
           
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.