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

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


            Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(),
                SchemaConstants.SCHEMA_MODIFICATIONS_DN );

            Entry mods =
                directoryService.getSchemaPartition().lookup(
                    new LookupOperationContext( null, schemaModificationAttributesDn, SchemaConstants.ALL_ATTRIBUTES_ARRAY ) );
           
// @todo enable this optimization at some point but for now it
// is causing some problems so I will just turn it off
//          Attribute modifyTimeDisk = mods.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
//
View Full Code Here


            {
                List<EntryFilteringCursor> cursors = new ArrayList<EntryFilteringCursor>();

                for ( Partition partition : partitions.values() )
                {
                    Entry entry = partition.lookup( new LookupOperationContext( directoryService.getAdminSession(),
                        partition.getSuffixDn() ) );

                    if ( entry != null )
                    {
                        Partition backend = getPartition( entry.getDn() );
View Full Code Here

            workerThread = new Thread( worker, "SynchWorkerThread" );
            workerThread.start();
        }

        // load the last stored valid CSN value
        LookupOperationContext loc = new LookupOperationContext( getAdminSession() );
        loc.setDn( systemPartition.getSuffixDn() );
        loc.setAttrsId( new String[]{ SchemaConstants.CONTEXT_CSN_AT } );
        Entry entry = systemPartition.lookup( loc );

        Attribute cntextCsnAt = entry.get( SchemaConstants.CONTEXT_CSN_AT );
       
        if ( cntextCsnAt != null )
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

     * @see org.apache.directory.server.core.schema.SchemaPartitionDao#getSchema(java.lang.String)
     */
    public Schema getSchema( String schemaName ) throws Exception
    {
        Dn dn = new Dn( schemaManager, "cn=" + schemaName + ",ou=schema" );
        return factory.getSchema( partition.lookup( new LookupOperationContext( null, dn ) ) );
    }
View Full Code Here

     * @see org.apache.directory.server.core.schema.SchemaPartitionDao#enableSchema(java.lang.String)
     */
    public void enableSchema( String schemaName ) throws Exception
    {
        Dn dn = new Dn( schemaManager, "cn=" + schemaName + ",ou=schema" );
        Entry entry = partition.lookup( new LookupOperationContext( null, dn ) );
        Attribute disabledAttr = entry.get( DISABLED_ATTRIBUTE_TYPE_AT );
        List<Modification> mods = new ArrayList<Modification>( 3 );

        if ( disabledAttr == null )
        {
View Full Code Here

     * {@inheritDoc}
     */
    public Entry lookup( Dn dn ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.lookup( new LookupOperationContext( this, dn ) );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public Entry lookup( Dn dn, String... attrIds ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.lookup( new LookupOperationContext( this, dn, attrIds ) );
    }
View Full Code Here

     * {@inheritDoc}
     */
    public Entry lookup( Dn dn, Control[] controls, String... attrIds ) throws LdapException
    {
        OperationManager operationManager = directoryService.getOperationManager();
        LookupOperationContext lookupContext = new LookupOperationContext( this, dn, attrIds );
        lookupContext.addRequestControls( controls );
       
        return operationManager.lookup( lookupContext );
    }
View Full Code Here

    {
        Entry entry = modifyContext.getEntry();

        if ( entry == null )
        {
            LookupOperationContext lookupCtx = new LookupOperationContext( modifyContext.getSession(), modifyContext.getDn() );
            entry = wrapped.lookup( lookupCtx );
        }

        Entry targetEntry = ( Entry ) SchemaUtils.getTargetEntry( modifyContext.getModItems(), entry );
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.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.