Package org.apache.directory.shared.ldap.model.message

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl


        if ( !psearchControl.isNotificationEnabled( ChangeType.MODDN ) )
        {
            return;
        }

        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
        respEntry.setObjectName( renameContext.getModifiedEntry().getDn() );
        respEntry.setEntry( renameContext.getModifiedEntry() );
        setECResponseControl( respEntry, renameContext, ChangeType.MODDN );
        session.getIoSession().write( respEntry );
    }
View Full Code Here


        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt decorator is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            // Filter the userPassword if the server mandate to do so
            if ( session.getCoreSession().getDirectoryService().isPasswordHidden() )
View Full Code Here

        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt control is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            return respEntry;
        }
View Full Code Here

        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt decorator is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            // Filter the userPassword if the server mandate to do so
            if ( session.getCoreSession().getDirectoryService().isPasswordHidden() )
View Full Code Here

        try
        {
            if ( pushInRealTime )
            {

                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( entry.getDn() );
                respEntry.setEntry( entry );

                SyncStateValueDecorator syncAdd = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncAdd.setSyncStateType( SyncStateTypeEnum.ADD );
                syncAdd
                    .setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT).getString()) );
                syncAdd.setCookie( getCookie( entry ) );
                respEntry.addControl( syncAdd );

                WriteFuture future = session.getIoSession().write( respEntry );
                handleWriteFuture( future, entry, EventType.ADD, null );
            }
            else
View Full Code Here

        try
        {
            if ( pushInRealTime )
            {
                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( entry.getDn() );
                respEntry.setEntry( entry );

                SyncStateValueDecorator syncDelete = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncDelete.setSyncStateType( SyncStateTypeEnum.DELETE );
                syncDelete.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                        .getString()) );
                syncDelete.setCookie( getCookie( entry ) );
                respEntry.addControl( syncDelete );

                WriteFuture future = session.getIoSession().write( respEntry );

                handleWriteFuture( future, entry, EventType.DELETE, null );
            }
View Full Code Here

        try
        {
            if ( pushInRealTime )
            {

                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( modifyContext.getDn() );
                respEntry.setEntry( alteredEntry );

                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncModify.setSyncStateType( SyncStateTypeEnum.MODIFY );
                syncModify.setEntryUUID( Strings.uuidToBytes(alteredEntry.get(SchemaConstants.ENTRY_UUID_AT)
                        .getString()) );
                syncModify.setCookie( getCookie( alteredEntry ) );
                respEntry.addControl( syncModify );

                WriteFuture future = session.getIoSession().write( respEntry );

                // store altered entry cause that holds the updated CSN
                handleWriteFuture( future, alteredEntry, EventType.MODIFY, null );
View Full Code Here

            modDnControl.setEntryDn( moveContext.getDn().getNormName() );
            modDnControl.setNewSuperiorDn( moveContext.getNewSuperior().getNormName() );

            if ( pushInRealTime )
            {
                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( moveContext.getDn() );
                respEntry.setEntry( entry );

                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                syncModify.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                        .getString()) );
                syncModify.setCookie( getCookie( entry ) );
                respEntry.addControl( syncModify );
                respEntry.addControl( modDnControl );

                WriteFuture future = session.getIoSession().write( respEntry );

                handleWriteFuture( future, entry, null, modDnControl );
            }
View Full Code Here

            if ( pushInRealTime )
            {
                Entry alteredEntry = moveAndRenameContext.getModifiedEntry();

                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( moveAndRenameContext.getModifiedEntry().getDn() );
                respEntry.setEntry( alteredEntry );

                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                syncModify.setEntryUUID( Strings.uuidToBytes(alteredEntry.get(SchemaConstants.ENTRY_UUID_AT)
                        .getString()) );
                syncModify.setCookie( getCookie( alteredEntry ) );
                respEntry.addControl( syncModify );
                respEntry.addControl( modDnControl );

                WriteFuture future = session.getIoSession().write( respEntry );

                handleWriteFuture( future, alteredEntry, null, modDnControl );
            }
View Full Code Here

            modDnControl.setNewRdn( renameContext.getNewRdn().getName() );
            modDnControl.setDeleteOldRdn( renameContext.getDeleteOldRdn() );

            if ( pushInRealTime )
            {
                SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
                respEntry.setObjectName( entry.getDn() );
                respEntry.setEntry( entry );

                SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
                    session.getLdapServer().getDirectoryService().getLdapCodecService() );
                syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
                syncModify.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
                        .getString()) );
                syncModify.setCookie( getCookie( renameContext.getModifiedEntry() ) );
                respEntry.addControl( syncModify );
                respEntry.addControl( modDnControl );

                WriteFuture future = session.getIoSession().write( respEntry );

                handleWriteFuture( future, renameContext.getModifiedEntry(), null, modDnControl );
            }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

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.