Package org.apache.directory.api.ldap.model.name

Examples of org.apache.directory.api.ldap.model.name.Dn.apply()


    {
        Dn systemDn = new Dn( schemaManager, "ou=system" );
        systemDn.apply( schemaManager );

        Dn adminDn = new Dn( schemaManager, "uid=admin, ou=system" );
        adminDn.apply( schemaManager );

        LdifEntry forward = new LdifEntry();
        forward.setDn( systemDn );
        forward.setChangeType( ChangeType.Add );
        forward.putAttribute( "objectClass", "organizationalUnit" );
View Full Code Here


        forward.setChangeType( ChangeType.Add );
        forward.putAttribute( "objectClass", "organizationalUnit" );
        forward.putAttribute( "ou", "system" );

        Dn reverseDn = forward.getDn();
        reverseDn.apply( schemaManager );

        LdifEntry reverse = LdifRevertor.reverseAdd( reverseDn );

        String zuluTime = DateUtils.getGeneralizedTime();
        long revision = 1L;
View Full Code Here

        partition.add( addCtx );

        SearchOperationContext searchCtx = new SearchOperationContext( session );

        Dn dn = new Dn( "dc=test,ou=test,ou=system" );
        dn.apply( schemaManager );
        searchCtx.setDn( dn );
        ExprNode filter = FilterParser.parse( schemaManager, "(ObjectClass=domain)" );
        NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( schemaManager );
        FilterNormalizingVisitor visitor = new FilterNormalizingVisitor( ncn, schemaManager );
        filter.accept( visitor );
View Full Code Here

        // Add to left hand side of cloned Dn the relative name arg
        try
        {
            target = target.add( relativeName );
            target.apply( schemaManager );
        }
        catch ( LdapInvalidDnException lide )
        {
            throw new InvalidNameException( lide.getMessage() );
        }
View Full Code Here

        ensureStarted();

        // Normalize the addContext Dn
        Dn dn = addContext.getDn();
        dn.apply( directoryService.getSchemaManager() );

        // We have to deal with the referral first
        directoryService.getReferralManager().lockRead();

        try
View Full Code Here

        }

        ensureStarted();
        // Normalize the compareContext Dn
        Dn dn = compareContext.getDn();
        dn.apply( directoryService.getSchemaManager() );

        // We have to deal with the referral first
        directoryService.getReferralManager().lockRead();

        try
View Full Code Here

        ensureStarted();

        // Normalize the deleteContext Dn
        Dn dn = deleteContext.getDn();
        dn.apply( directoryService.getSchemaManager() );

        // We have to deal with the referral first
        directoryService.getReferralManager().lockRead();

        try
View Full Code Here

    private boolean isSearchable( OperationContext opContext, Entry entry ) throws LdapException
    {
        Dn principalDn = opContext.getSession().getEffectivePrincipal().getDn();
        Dn dn = entry.getDn();

        dn.apply( schemaManager );

        // Admin users gets full access to all entries
        if ( isAnAdministrator( principalDn ) )
        {
            return true;
View Full Code Here

        ensureStarted();

        // Normalize the modifyContext Dn
        Dn dn = modifyContext.getDn();
        dn.apply( directoryService.getSchemaManager() );

        ReferralManager referralManager = directoryService.getReferralManager();

        // We have to deal with the referral first
        referralManager.lockRead();
View Full Code Here

        ensureStarted();

        // Normalize the moveContext Dn
        Dn dn = moveContext.getDn();
        dn.apply( directoryService.getSchemaManager() );

        // Normalize the moveContext superior Dn
        Dn newSuperiorDn = moveContext.getNewSuperior();
        newSuperiorDn.apply( directoryService.getSchemaManager() );
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.