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

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


        // Update the referralManager. We have to read the entry again
        // as it has been modified, before updating the ReferralManager
        // TODO: this can be spare, as we build the entry later.
        // But we will have to store the modified entry into the opContext
        LookupOperationContext lookupContext = new LookupOperationContext( opContext.getSession(), name );
       
        ServerEntry newEntry = nexus.lookup( lookupContext );

        // Check that we have the entry, just in case
        // TODO : entries should be locked until the operation is done on it.
View Full Code Here


     */
    public Schema getSchema( String schemaName ) throws Exception
    {
        DN dn = new DN( "cn=" + schemaName + ",ou=schema" );
        dn.normalize( schemaManager.getNormalizerMapping() );
        return factory.getSchema( partition.lookup( new LookupOperationContext( null, dn ) ) );
    }
View Full Code Here

     */
    public void enableSchema( String schemaName ) throws Exception
    {
        DN dn = new DN( "cn=" + schemaName + ",ou=schema" );
        dn.normalize( schemaManager.getNormalizerMapping() );
        ServerEntry entry = partition.lookup( new LookupOperationContext( null, dn ) );
        EntryAttribute disabledAttr = entry.get( disabledAttributeType );
        List<Modification> mods = new ArrayList<Modification>( 3 );

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

    void lookupPrincipalAttributes( ModifyOperationContext modContext, ModifySubContext subContext )
        throws Exception
    {
        DN principalDn = modContext.getDn();

        LookupOperationContext lookupContext = modContext.newLookupContext( principalDn );
        lookupContext.setByPassed( USERLOOKUP_BYPASS );
        lookupContext.setAttrsId( new String[]
        {
            SchemaConstants.OBJECT_CLASS_AT,
            KerberosAttribute.KRB5_PRINCIPAL_NAME_AT,
            KerberosAttribute.KRB5_KEY_VERSION_NUMBER_AT
        } );
View Full Code Here

        synchronized ( schemaSubentrLock )
        {
            if ( schemaSubentry == null )
            {
                generateSchemaSubentry( schemaPartition.lookup(
                        new LookupOperationContext( null, schemaModificationAttributesDN ) ) );
            }
   
            return ( ServerEntry ) schemaSubentry.clone();
        }
    }
View Full Code Here

    public ServerEntry getSubschemaEntryCloned() throws Exception
    {
        if ( schemaSubentry == null )
        {
            generateSchemaSubentry( schemaPartition.lookup(
                    new LookupOperationContext( null, schemaModificationAttributesDN ) ) );
        }

        return ( ServerEntry ) schemaSubentry.clone();
    }
View Full Code Here

            // Check if we need an update by looking at timestamps on disk
            // ---------------------------------------------------------------

            ServerEntry mods =
                schemaPartition.lookup(
                    new LookupOperationContext( null, schemaModificationAttributesDN ) );
           
// @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

        boolean needToChangeAdminPassword = false;

        DN adminDn = new DN( ServerDNConstants.ADMIN_SYSTEM_DN );
        adminDn.normalize( schemaManager.getNormalizerMapping() );
       
        ServerEntry adminEntry = partitionNexus.lookup( new LookupOperationContext( adminSession, adminDn ) );
        Object userPassword = adminEntry.get( SchemaConstants.USER_PASSWORD_AT ).get();
       
        if ( userPassword instanceof byte[] )
        {
            needToChangeAdminPassword = Arrays.equals( PartitionNexus.ADMIN_PASSWORD_BYTES, ( byte[] ) userPassword );
View Full Code Here

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

     */
    public ClonedServerEntry lookup( DN dn, String[] attrId ) throws Exception
    {
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.lookup(
            new LookupOperationContext( this, dn, attrId ) );
    }
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.