Examples of EntryChangeControl


Examples of org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControl

   
    private void setECResponseControl( InternalSearchResponseEntry response, ChangeOperationContext opContext, ChangeType type )
    {
        if ( control.isReturnECs() )
        {
            EntryChangeControl ecControl = new EntryChangeControl();
            ecControl.setChangeType( type );
           
            if ( opContext.getChangeLogEvent() != null )
            {
                ecControl.setChangeNumber( opContext.getChangeLogEvent().getRevision() );
            }
        
            if ( opContext instanceof RenameOperationContext || opContext instanceof MoveOperationContext )
            {
                ecControl.setPreviousDn( opContext.getDn() );
            }
           
            response.add( ecControl );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControl

                ctx.setRequestControls( JndiUtils.toJndiControls( ctxCtls ) );
                isReady = true;
                LOG.debug( "PSearchListener is ready and about to issue persistent search request." );
                list = ctx.search( "", "objectClass=*", null );
                LOG.debug( "PSearchListener search request returned." );
                EntryChangeControl ecControl = null;

                while ( list.hasMore() )
                {
                    LOG.debug( "PSearchListener search request got an item." );
                    javax.naming.ldap.Control[] controls = null;
                    SearchResult sresult = list.next();
                   
                    if ( sresult instanceof HasControls )
                    {
                        controls = ( ( HasControls ) sresult ).getControls();
                       
                        if ( controls != null )
                        {
                            for ( javax.naming.ldap.Control control : controls )
                            {
                                if ( control.getID().equals(
                                    EntryChangeControl.CONTROL_OID ) )
                                {
                                    EntryChangeControlDecoder decoder = new EntryChangeControlDecoder();
                                    ecControl = ( EntryChangeControl ) decoder.decode( control.getEncodedValue(), new EntryChangeControl() );
                                }
                            }
                        }
                    }
                   
View Full Code Here

Examples of org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControl

                ctx.setRequestControls( JndiUtils.toJndiControls( ctxCtls ) );
                isReady = true;
                LOG.debug( "PSearchListener is ready and about to issue persistent search request." );
                list = ctx.search( "", "objectClass=*", null );
                LOG.debug( "PSearchListener search request returned." );
                EntryChangeControl ecControl = null;

                while ( list.hasMore() )
                {
                    LOG.debug( "PSearchListener search request got an item." );
                    javax.naming.ldap.Control[] controls = null;
                    SearchResult sresult = list.next();
                   
                    if ( sresult instanceof HasControls )
                    {
                        controls = ( ( HasControls ) sresult ).getControls();
                       
                        if ( controls != null )
                        {
                            for ( javax.naming.ldap.Control control : controls )
                            {
                                if ( control.getID().equals(
                                    EntryChangeControl.CONTROL_OID ) )
                                {
                                    EntryChangeControlDecoder decoder = new EntryChangeControlDecoder();
                                    ecControl = ( EntryChangeControl ) decoder.decode( control.getEncodedValue(), new EntryChangeControl() );
                                }
                            }
                        }
                    }
                   
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.