Examples of SyncStateValueDecorator


Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

                                           //         modify (2)
                                           //     }
            } );
        bb.flip();

        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );

        decorator.decode( bb.array() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

                0x04, 0x03, 'a', 'b', 'c',     //     entryUUID syncUUID OPTIONAL,
                0x04, 0x04, 'x', 'k', 'c', 'd' //     cookie syncCookie OPTIONAL,
            } );
        bb.flip();

        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );

        SyncStateValue syncStateValue = (SyncStateValue)decorator.decode( bb.array() );

        assertEquals( SyncStateTypeEnum.MODDN, syncStateValue.getSyncStateType() );
        assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
        assertEquals( "xkcd", Strings.utf8ToString(syncStateValue.getCookie()) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

        SyncStateTypeEnum syncStateType ) throws Exception
    {
        Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
       
        // Create the SyncState control
        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
            ldapServer.getDirectoryService().getLdapCodecService() );
        syncStateControl.setSyncStateType( syncStateType );
        syncStateControl.setEntryUUID( Strings.uuidToBytes( uuid.getString() ) );

        if ( syncStateType == SyncStateTypeEnum.DELETE )
        {
            // clear the entry's all attributes except the Dn and entryUUID
            entry.clear();
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

    private void sendSearchResultEntry( LdapSession session, SearchRequest req, Entry entry,
        SyncModifyDn modDnControl ) throws Exception
    {

        Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
            ldapServer.getDirectoryService().getLdapCodecService() );
        syncStateControl.setSyncStateType( SyncStateTypeEnum.MODDN );
        syncStateControl.setEntryUUID( Strings.uuidToBytes(uuid.getString()) );

        Response resp = generateResponse( session, req, entry );
        resp.addControl( syncStateControl );
        resp.addControl( modDnControl );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

                control = new SyncRequestValueDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case SYNC_STATE_VALUE_CONTROL:
                control = new SyncStateValueDecorator( getDirectoryService().getLdapCodecService() );

                break;
        }

        control.setCritical( jndiControl.isCritical() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

     * Create the SyncStateValue control
     */
    private SyncStateValue createControl( DirectoryService directoryService, SyncStateTypeEnum operation, Entry entry )
        throws LdapInvalidAttributeValueException
    {
        SyncStateValue syncStateValue = new SyncStateValueDecorator( directoryService.getLdapCodecService() );

        syncStateValue.setSyncStateType( operation );
        syncStateValue.setEntryUUID(
            Strings.uuidToBytes( entry.get( SchemaConstants.ENTRY_UUID_AT ).getString() ) );
        syncStateValue.setCookie( getCookie( entry ) );
       
        return syncStateValue;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

        SyncStateTypeEnum syncStateType ) throws Exception
    {
        Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );

        // Create the SyncState control
        SyncStateValue syncStateControl = new SyncStateValueDecorator(
            ldapServer.getDirectoryService().getLdapCodecService() );
        syncStateControl.setSyncStateType( syncStateType );
        syncStateControl.setEntryUUID( Strings.uuidToBytes( uuid.getString() ) );

        if ( syncStateType == SyncStateTypeEnum.DELETE )
        {
            // clear the entry's all attributes except the Dn and entryUUID
            entry.clear();
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

                control = new SyncRequestValueDecorator( getDirectoryService().getLdapCodecService() );

                break;

            case SYNC_STATE_VALUE_CONTROL:
                control = new SyncStateValueDecorator( getDirectoryService().getLdapCodecService() );

                break;
        }

        control.setCritical( jndiControl.isCritical() );
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

     * Create the SyncStateValue control
     */
    private SyncStateValue createControl( DirectoryService directoryService, SyncStateTypeEnum operation, Entry entry )
        throws LdapInvalidAttributeValueException
    {
        SyncStateValue syncStateValue = new SyncStateValueDecorator( directoryService.getLdapCodecService() );

        syncStateValue.setSyncStateType( operation );
        String uuidStr = entry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
        syncStateValue.setEntryUUID( Strings.uuidToBytes( uuidStr ) );
        syncStateValue.setCookie( getCookie( entry ) );

        return syncStateValue;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncStateValueDecorator

    private void sendSearchResultEntry( LdapSession session, SearchRequest req, Entry entry,
        SyncStateTypeEnum syncStateType ) throws Exception
    {

        Attribute uuid = entry.get( SchemaConstants.ENTRY_UUID_AT );
        SyncStateValueDecorator syncStateControl = new SyncStateValueDecorator(
            ldapServer.getDirectoryService().getLdapCodecService() );
        syncStateControl.setSyncStateType( syncStateType );
        syncStateControl.setEntryUUID( Strings.uuidToBytes(uuid.getString()) );

        if ( syncStateType == SyncStateTypeEnum.DELETE )
        {
            // clear the entry's all attributes except the Dn and entryUUID
            entry.clear();
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.