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

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


        Dn target = buildTarget( JndiUtils.fromName( name ) );
        OperationManager operationManager = service.getOperationManager();

        try
        {
            if ( operationManager.hasEntry( new EntryOperationContext( session, target ) ) )
            {
                doDeleteOperation( target );
            }
        }
        catch ( Exception e )
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public boolean exists( Dn dn ) throws LdapException
    {
        EntryOperationContext hasEntryContext = new EntryOperationContext( this, dn );
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.hasEntry( hasEntryContext );
    }
View Full Code Here

        {
            throw new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_249 ) );
        }
       
        // check if the entry already exists
        if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), name ) ) )
        {
            LdapEntryAlreadyExistsException ne = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_250, name.getName() ) );
            //ne.setResolvedName( new DN( name.getName() ) );
            throw ne;
        }
View Full Code Here

        }
       
        // check to see if target entry exists
        DN newDn = opContext.getNewDn();
       
        if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), newDn ) ) )
        {
            LdapEntryAlreadyExistsException e;
            e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_257, newDn.getName() ) );
            //e.setResolvedName( new DN( newDn.getName() ) );
            throw e;
View Full Code Here

        // check to see if target entry exists
        String rdn = oriChildName.get( oriChildName.size() - 1 );
        DN target = ( DN ) newParentName.clone();
        target.add( rdn );
       
        if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), target ) ) )
        {
            // we must calculate the resolved name using the user provided Rdn value
            String upRdn = new DN( oriChildName.getName() ).get( oriChildName.size() - 1 );
            DN upTarget = ( DN ) newParentName.clone();
            upTarget.add( upRdn );
View Full Code Here

        // check to see if target entry exists
        DN target = ( DN ) parent.clone();
        target.add( opContext.getNewRdn() );

        if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), target ) ) )
        {
            // we must calculate the resolved name using the user provided Rdn value
            DN upTarget = ( DN ) parent.clone();
            upTarget.add( opContext.getNewRdn() );
View Full Code Here

    {
        DN target = buildTarget( DN.fromName( name ) );

        try
        {
            if ( getDirectoryService().getOperationManager().hasEntry( new EntryOperationContext( getSession(), target ) ) )
            {
                doDeleteOperation( target );
            }
        }
        catch ( Exception e )
View Full Code Here

    }


    public boolean exists( DN dn ) throws Exception
    {
        EntryOperationContext opContext = new EntryOperationContext( this, dn );
        OperationManager operationManager = directoryService.getOperationManager();
        return operationManager.hasEntry( opContext );
    }
View Full Code Here

            props.getSaslMechanism(), props.getSaslAuthId() );

        session = opContext.getSession();
        OperationManager operationManager = service.getOperationManager();
       
        if ( ! operationManager.hasEntry( new EntryOperationContext( session, dn ) ) )
        {
            throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
        }
    }
View Full Code Here

        this.env.put( PROVIDER_URL, dn.toString() );
        this.env.put( DirectoryService.JNDI_KEY, service );
        session = new DefaultCoreSession( principal, service );
        OperationManager operationManager = service.getOperationManager();
       
        if ( ! operationManager.hasEntry( new EntryOperationContext( session, dn ) ) )
        {
            throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.interceptor.context.EntryOperationContext

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.