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

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


    public void init( DirectoryService directoryService ) throws Exception
    {
        super.init( directoryService );

        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 );

        tupleCache = new TupleCache( adminSession );
        groupCache = new GroupCache( adminSession );
View Full Code Here


        // stuff for dealing with subentries (garbage for now)
        Value<?> subschemaSubentry =
            directoryService.getPartitionNexus().getRootDSE( null ).
                get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
        LdapDN subschemaSubentryDnName = new LdapDN( subschemaSubentry.getString() );
        subschemaSubentryDnName.normalize( atRegistry.getNormalizerMapping() );
        subschemaSubentryDn = subschemaSubentryDnName.toNormName();
    }


    private void protectCriticalEntries( LdapDN dn ) throws Exception
View Full Code Here

        // search each namingContext for subentries
        for ( String suffix:suffixes )
        {
            LdapDN suffixDn = new LdapDN( suffix );
            suffixDn.normalize( atRegistry.getNormalizerMapping() );

            LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
            adminDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            CoreSession adminSession = new DefaultCoreSession(
                new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), directoryService );
View Full Code Here

        {
            LdapDN suffixDn = new LdapDN( suffix );
            suffixDn.normalize( atRegistry.getNormalizerMapping() );

            LdapDN adminDn = new LdapDN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
            adminDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
            CoreSession adminSession = new DefaultCoreSession(
                new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), directoryService );

            EntryFilteringCursor subentries = nexus.search( new SearchOperationContext( adminSession,
                suffixDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls ) );
View Full Code Here

                {
                    LOG.warn( "Failed while parsing subtreeSpecification for " + dnName );
                    continue;
                }

                dnName.normalize( atRegistry.getNormalizerMapping() );
                subentryCache.setSubentry( dnName.toString(), ss, getSubentryTypes( subentry ) );
            }
        }
    }
View Full Code Here

        LdapPrincipal principal = lookupContext.getSession().getEffectivePrincipal();
        LdapDN principalDn = principal.getJndiName();
       
        if ( !principalDn.isNormalized() )
        {
            principalDn.normalize( atRegistry.getNormalizerMapping() );
        }
       
        if ( isPrincipalAnAdministrator( principalDn ) || !enabled )
        {
            return next.lookup( lookupContext );
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( addContext.getSession(), dn,
                        getOperationalModsForAdd( candidate, operational ) ) );
View Full Code Here

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

                if ( evaluator.evaluate( ss, 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( ss, apName, dn, candidate ) )
                {
                    nexus.modify( new ModifyOperationContext( opContext.getSession(), dn,
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 ) name.clone();
            newName.remove( newName.size() - 1 );
            newName.add( opContext.getNewRdn() );
            newName.normalize( atRegistry.getNormalizerMapping() );
            List<Modification> mods = getModsOnEntryRdnChange( name, newName, entry );

            if ( mods.size() > 0 )
            {
                nexus.modify( new ModifyOperationContext( opContext.getSession(), newName, mods ) );
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.