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

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


    public void moveAndRename( NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext )
        throws Exception
    {
        DN rdn = new DN();
        rdn.add( opContext.getNewRdn() );
        rdn.normalize( schemaManager.getNormalizerMapping() );
        opContext.setNewRdn( rdn.getRdn() );

        opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
        opContext.getParent().normalize( schemaManager.getNormalizerMapping() );
        nextInterceptor.moveAndRename( opContext );
View Full Code Here


        referralManager = new ReferralManagerImpl( directoryService );
        directoryService.setReferralManager( referralManager );

        Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
        DN subschemaSubentryDn = new DN( subschemaSubentry.getString() );
        subschemaSubentryDn.normalize( schemaManager.getNormalizerMapping() );
        subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
    }


    /**
 
View Full Code Here

        DN newUpdn = ( DN ) 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( schemaManager.getNormalizerMapping() );

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

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

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

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

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

       
        Modification mod = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
        mods.add( mod );
     
        DN userDn = new DN( "uid=akarasulu,ou=users,ou=system" );
        userDn.normalize( service.getSchemaManager().getAttributeTypeRegistry().getNormalizerMapping() );
        LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
        CoreSession akarasuluSession = service.getSession( principal );

        try
        {
View Full Code Here

   
   
    private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
    {
        DN dn = new DN( getSubschemaSubentryDN() );
        dn.normalize( service.getSchemaManager().getNormalizerMapping() );
        Attribute attr = new BasicAttribute( opAttr );
       
        for ( String description : descriptions )
        {
            attr.add( description );
View Full Code Here

        DN newUpdn = ( DN ) 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( schemaManager.getNormalizerMapping() );

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

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

        requestor.getIoSession().write( new LaunchDiagnosticUiResponse( req.getMessageId() ) );

        PartitionNexus nexus = service.getPartitionNexus();
        DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
        adminDn.normalize( service.getSchemaManager().getNormalizerMapping() );
        LdapPrincipal principal = new LdapPrincipal( adminDn, AuthenticationLevel.STRONG );
        CoreSession session = service.getSession( principal );
        Set<String> suffixes = nexus.listSuffixes( new ListSuffixOperationContext( session ) );
        int launchedWindowCount = 0;
           
View Full Code Here

        DirectoryService ds = session.getCoreSession().getDirectoryService();
        PartitionNexus nexus = ds.getPartitionNexus();
        Value<?> subschemaSubentry = nexus.getRootDSE( null ).get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
        DN subschemaSubentryDn = new DN( subschemaSubentry.getString() );
        subschemaSubentryDn.normalize( ds.getSchemaManager().getNormalizerMapping() );
        String subschemaSubentryDnNorm = subschemaSubentryDn.getNormName();
       
        return subschemaSubentryDnNorm.equals( baseNormForm );
    }
}
View Full Code Here


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


    private void initialize( CoreSession session ) throws Exception
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.