Examples of toNormName()


Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.ADD_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        store.modify( dn, mods );
        assertTrue( lookedup.get( "sn" ).contains( attribVal ) );

        // testing the store.modify( dn, mod, entry ) API
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
        attribVal = "+1974045779";
        entry.add( "telephoneNumber", attribVal );

        store.modify( dn, ModificationOperation.ADD_ATTRIBUTE, entry );
        lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );
        assertTrue( lookedup.get( "telephoneNumber" ).contains( attribVal ) );
    }


    @Test
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertEquals( "WAlkeR", lookedup.get( "sn" ).get().getString() ); // before replacing

        store.modify( dn, mods );
        assertEquals( attribVal, lookedup.get( "sn" ).get().getString() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        RDN rdn = dn.getRdn( 1 );
       
        if ( !rdn.getNormType().equalsIgnoreCase( CN_OID ) )
        {
            throw new NamingException( I18n.err( I18n.ERR_434, dn.toNormName(), CN_OID, rdn.getNormType() ) );
        }

        return ( String ) rdn.getNormValue();
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

            .lookupAttributeTypeRegistry( SchemaConstants.SN_AT_OID ) );

        Modification add = new ServerModification( ModificationOperation.REMOVE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertNotNull( lookedup.get( "sn" ).get() );

        store.modify( dn, mods );
        assertNull( lookedup.get( "sn" ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        attrib.add( attribVal );

        Modification add = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
        mods.add( add );

        ServerEntry lookedup = store.lookup( store.getEntryId( dn.toNormName() ) );

        assertNull( lookedup.get( "ou" ) ); // before replacing

        store.modify( dn, mods );
        assertEquals( attribVal, lookedup.get( "ou" ).get().getString() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        if ( isPrincipalAnAdministrator( principalDn ) || !opContext.getSession().getDirectoryService().isAccessControlEnabled() )
        {
            return next.compare( opContext );
        }

        Set<DN> userGroups = groupCache.getGroups( principalDn.toNormName() );
        Collection<ACITuple> tuples = new HashSet<ACITuple>();
        addPerscriptiveAciTuples( opContext, tuples, name, entry.getOriginalEntry() );
        addEntryAciTuples( tuples, entry );
        addSubentryAciTuples( opContext, tuples, name, entry );
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

        {
            EntryFilteringCursor cursor =  nextInterceptor.search( opContext );
           
            if ( ! cursor.next() )
            {
                if ( !base.isEmpty() && !( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )
                {
                    // We just check that the entry exists only if we didn't found any entry
                    assertHasEntry( nextInterceptor, opContext, "Attempt to search under non-existant entry:" , base );
                }
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

         * process and return false.
         */
       
        LdapPrincipal principal = opContext.getSession().getEffectivePrincipal();
        DN userDn = principal.getClonedName();
        Set<DN> userGroups = groupCache.getGroups( userDn.toNormName() );
        Collection<ACITuple> tuples = new HashSet<ACITuple>();
        addPerscriptiveAciTuples( opContext, tuples, normName, clonedEntry.getOriginalEntry() );
        addEntryAciTuples( tuples, clonedEntry.getOriginalEntry() );
        addSubentryAciTuples( opContext, tuples, normName, clonedEntry.getOriginalEntry() );

View Full Code Here

Examples of org.apache.directory.shared.ldap.name.DN.toNormName()

                return objectClasses.contains( SchemaConstants.SUBENTRY_OC );
            }

            DN ndn = new DN( dn );
            ndn.normalize( schemaManager.getNormalizerMapping() );
            return subentryCache.hasSubentry( ndn.toNormName() );
        }
    }


    private List<Modification> getModsOnEntryModification( DN name, ServerEntry oldEntry, ServerEntry newEntry )
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.