Package org.apache.directory.server.core.api.interceptor.context

Examples of org.apache.directory.server.core.api.interceptor.context.LookupOperationContext


        Rdn rdn = new Rdn( "sn=James" );

        store.rename( dn, rdn, true, null );

        dn = new Dn( schemaManager, "sn=James,ou=Engineering,o=Good Times Co." );
        Entry renamed = store.lookup( new LookupOperationContext( session, dn ) );
        assertNotNull( renamed );
        assertEquals( "James", renamed.getDn().getRdn().getValue().getString() );
    }
View Full Code Here


        initialize();
        showSecurityWarnings();

        // load the last stored valid CSN value
        LookupOperationContext loc = new LookupOperationContext( getAdminSession(), systemPartition.getSuffixDn(),
            SchemaConstants.ALL_ATTRIBUTES_ARRAY );

        Entry entry = systemPartition.lookup( loc );

        Attribute cntextCsnAt = entry.get( SchemaConstants.CONTEXT_CSN_AT );
View Full Code Here

        // Warn if the default password is not changed.
        boolean needToChangeAdminPassword = false;

        Dn adminDn = getDnFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );

        Entry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession, adminDn ) );
        Value<?> userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
        needToChangeAdminPassword = Arrays.equals( PartitionNexus.ADMIN_PASSWORD_BYTES, userPassword.getBytes() );

        if ( needToChangeAdminPassword )
        {
View Full Code Here

            Entry attrs;

            try
            {
                CoreSession session = addContext.getSession();
                LookupOperationContext lookupContext = new LookupOperationContext( session, parentDn,
                    SchemaConstants.ALL_ATTRIBUTES_ARRAY );

                attrs = directoryService.getPartitionNexus().lookup( lookupContext );
            }
            catch ( Exception e )
View Full Code Here

        Rdn rdn = new Rdn( "sn=James" );

        store.rename( dn, rdn, true, null );

        dn = new Dn( schemaManager, "sn=James,ou=Engineering,o=Good Times Co." );
        Entry renamed = store.lookup( new LookupOperationContext( session, dn ) );
        assertNotNull( renamed );
        assertEquals( "James", renamed.getDn().getRdn().getValue().getString() );
    }
View Full Code Here

                // We're only adding the entry if the two DNs are equal
                if ( suffixDn.equals( contextEntryDn ) )
                {
                    // Looking for the current context entry
                    Entry suffixEntry = lookup( new LookupOperationContext( null, suffixDn ) );

                    // We're only adding the context entry if it doesn't already exist
                    if ( suffixEntry == null )
                    {
                        // Checking of the context entry is schema aware
View Full Code Here

        initialize();
        showSecurityWarnings();

        // load the last stored valid CSN value
        LookupOperationContext loc = new LookupOperationContext( getAdminSession(), systemPartition.getSuffixDn(),
            SchemaConstants.ALL_ATTRIBUTES_ARRAY );

        Entry entry = systemPartition.lookup( loc );

        Attribute cntextCsnAt = entry.get( SchemaConstants.CONTEXT_CSN_AT );
View Full Code Here

        // Warn if the default password is not changed.
        boolean needToChangeAdminPassword = false;

        Dn adminDn = getDnFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );

        Entry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession, adminDn ) );
        Value<?> userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
        needToChangeAdminPassword = Arrays.equals( PartitionNexus.ADMIN_PASSWORD_BYTES, userPassword.getBytes() );

        if ( needToChangeAdminPassword )
        {
View Full Code Here

                // We're only adding the entry if the two DNs are equal
                if ( suffixDn.equals( contextEntryDn ) )
                {
                    // Looking for the current context entry
                    Entry suffixEntry = lookup( new LookupOperationContext( null, suffixDn ) );

                    // We're only adding the context entry if it doesn't already exist
                    if ( suffixEntry == null )
                    {
                        // Checking of the context entry is schema aware
View Full Code Here

         */
        if ( oc.contains( SchemaConstants.SUBENTRY_OC ) )
        {
            Dn parentDn = dn.getParent();
            CoreSession session = opContext.getSession();
            LookupOperationContext lookupContext = new LookupOperationContext( session, parentDn,
                SchemaConstants.ALL_ATTRIBUTES_ARRAY );

            originalEntry = directoryService.getPartitionNexus().lookup( lookupContext );
        }

View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.interceptor.context.LookupOperationContext

Copyright © 2018 www.massapicom. 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.