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

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


   
    @Test public void testSerializeServerEntryWithNoAttributes() throws Exception
    {
        DN dn = new DN( "" );
        dn.normalize( oids );
       
        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );

        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
       
View Full Code Here


   
   
    @Test public void testSerializeServerEntryWithAttributeNoValue() throws Exception
    {
        DN dn = new DN( "" );
        dn.normalize( oids );
       
        ServerEntry entry = new DefaultServerEntry( schemaManager, dn );

        ServerEntrySerializer ses = new ServerEntrySerializer( schemaManager );
        EntryAttribute oc = new DefaultServerAttribute( "ObjectClass", schemaManager.lookupAttributeTypeRegistry( "objectclass" ) );
View Full Code Here

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

            DN ndn = new DN( dn );
            ndn.normalize( schemaManager.getNormalizerMapping() );
            String normalizedDn = ndn.getNormName();
            return !subentryCache.hasSubentry( normalizedDn );
        }
    }
View Full Code Here

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

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

View Full Code Here


    private DN parseNormalized( SchemaManager schemaManager, String name ) throws NamingException
    {
        DN dn = new DN( name );
        dn.normalize( schemaManager.getNormalizerMapping() );
        return dn;
    }


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

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

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

        {
            DN suffixDn = new DN( suffix );
            suffixDn.normalize( schemaManager.getNormalizerMapping() );

            DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
            adminDn.normalize( schemaManager.getNormalizerMapping() );
            CoreSession adminSession = new DefaultCoreSession(
                new LdapPrincipal( adminDn, AuthenticationLevel.STRONG ), directoryService );

            SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffixDn,
                filter, controls );
View Full Code Here

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

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

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

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

    public void add( ServerEntry entry ) throws Exception
    {
        DN dn = entry.getDn();
        DN parentDn = ( DN ) dn.clone();
        parentDn.remove( parentDn.size() - 1 );
        parentDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );

        if ( !parentDn.equals( ouSchemaDN ) )
        {
            throw new LdapInvalidNameException( I18n.err( I18n.ERR_380, ouSchemaDN.getName(),
                parentDn.toNormName() ), ResultCodeEnum.NAMING_VIOLATION );
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.