You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/03/06 16:36:15 UTC
svn commit: r1664660 - in /directory/shared/trunk:
integ/src/test/java/org/apache/directory/api/ldap/codec/api/
ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/
ldap/codec/standalone/src/test/java/org/apache/directory...
Author: elecharny
Date: Fri Mar 6 15:36:15 2015
New Revision: 1664660
URL: http://svn.apache.org/r1664660
Log:
Added the VLV codec using Radovan's code
Added:
directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/
directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequest.java
directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequestImpl.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAfterCount.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAssertionValue.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreBeforeCount.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContentCount.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContextId.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreOffset.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestContainer.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestDecorator.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestFactory.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestStates.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewerTags.java
Modified:
directory/shared/trunk/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java?rev=1664660&r1=1664659&r2=1664660&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java (original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/api/ldap/codec/api/StandaloneLdapCodecServiceTest.java Fri Mar 6 15:36:15 2015
@@ -53,6 +53,7 @@ public class StandaloneLdapCodecServiceT
"org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
"org.apache.directory.api.ldap.codec.controls.search.subentries.SubentriesFactory," +
"org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory," +
+ "org.apache.directory.api.ldap.extras.controls.ppolicy_impl.VirtualListViewRequestFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
Modified: directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java?rev=1664660&r1=1664659&r2=1664660&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/CodecFactoryUtil.java Fri Mar 6 15:36:15 2015
@@ -46,6 +46,8 @@ import org.apache.directory.api.ldap.ext
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory;
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory;
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest;
+import org.apache.directory.api.ldap.extras.controls.vlv_impl.VirtualListViewRequestFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory;
@@ -114,6 +116,11 @@ public class CodecFactoryUtil
controlFactories.put( passwordPolicyFactory.getOid(), passwordPolicyFactory );
LOG.info( "Registered pre-bundled control factory: {}", passwordPolicyFactory.getOid() );
+ ControlFactory<VirtualListViewRequest> virtualListViewRequestFactory = new VirtualListViewRequestFactory(
+ apiService );
+ controlFactories.put( virtualListViewRequestFactory.getOid(), virtualListViewRequestFactory );
+ LOG.info( "Registered pre-bundled control factory: {}", virtualListViewRequestFactory.getOid() );
+
ControlFactory<SyncDoneValue> SyncDoneValueFactory = new SyncDoneValueFactory( apiService );
controlFactories.put( SyncDoneValueFactory.getOid(), SyncDoneValueFactory );
LOG.info( "Registered pre-bundled control factory: {}", SyncDoneValueFactory.getOid() );
Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java?rev=1664660&r1=1664659&r2=1664660&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/api/ldap/codec/standalone/AbstractCodecServiceTest.java Fri Mar 6 15:36:15 2015
@@ -56,6 +56,7 @@ public abstract class AbstractCodecServi
"org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory," +
"org.apache.directory.api.ldap.codec.controls.search.subentries.SubentriesFactory," +
"org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory," +
+ "org.apache.directory.api.ldap.extras.controls.ppolicy_impl.VirtualListViewRequestFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory," +
"org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory," +
Added: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequest.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequest.java (added)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequest.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv;
+
+
+import org.apache.directory.api.ldap.model.message.Control;
+
+
+/**
+ * Virtual List View control as specified in draft-ietf-ldapext-ldapv3-vlv-09.
+ *
+ * VirtualListViewRequest ::= SEQUENCE {
+ * beforeCount INTEGER (0..maxInt),
+ * afterCount INTEGER (0..maxInt),
+ * target CHOICE {
+ * byOffset [0] SEQUENCE {
+ * offset INTEGER (1 .. maxInt),
+ * contentCount INTEGER (0 .. maxInt) },
+ * greaterThanOrEqual [1] AssertionValue },
+ * contextID OCTET STRING OPTIONAL }
+ *
+ * Note : the target is set accordingly to which of the setOffset() or
+ * assertionValue() method is called last.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public interface VirtualListViewRequest extends Control
+{
+ /** This control OID */
+ String OID = "2.16.840.1.113730.3.4.9";
+
+
+ /**
+ * @return The number of entries before the target entry that are going to be sent
+ */
+ int getBeforeCount();
+
+
+ /**
+ * @param beforeCount Set the number of entries to be returned before the target entry
+ */
+ void setBeforeCount( int beforeCount );
+
+
+ /**
+ * @return The number of entries after the target entry that are going to be sent
+ */
+ int getAfterCount();
+
+
+ /**
+ * @param beforeCount Set the number of entries to be returned after the target entry
+ */
+ void setAfterCount( int afterCount );
+
+
+ /**
+ * @return The position of the target entry
+ */
+ int getOffset();
+
+
+ /**
+ * @param the position of the target entry
+ */
+ void setOffset( int offset );
+
+
+ /**
+ * @return The number of expected entries
+ */
+ int getContentCount();
+
+
+ /**
+ * @param contentCount The number of entries
+ */
+ void setContentCount( int contentCount );
+
+
+ /**
+ * @return The AssertionValue
+ */
+ byte[] getAssertionValue();
+
+
+ /**
+ * @param assertionValue Set the AssertionValue
+ */
+ void setAssertionValue( byte[] assertionValue );
+
+
+ /**
+ * @return The ID used for this request
+ */
+ byte[] getContextId();
+
+
+ /**
+ * @param contextId Set the context ID
+ */
+ void setContextId( byte[] contextId );
+
+
+ /**
+ * @return <code>true</code> if the VLV target is an offset, false otherwise
+ */
+ boolean hasOffset();
+
+
+ /**
+ * @return <code>true</code> if the VLV target is an assertionValue, false otherwise
+ */
+ boolean hasAssertionValue();
+}
Added: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequestImpl.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequestImpl.java (added)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv/VirtualListViewRequestImpl.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,295 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv;
+
+
+import java.util.Arrays;
+
+import org.apache.directory.api.ldap.model.message.controls.AbstractControl;
+import org.apache.directory.api.util.Strings;
+
+
+/**
+ * Virtual List View control as specified in draft-ietf-ldapext-ldapv3-vlv-09.
+ *
+ * VirtualListViewRequest ::= SEQUENCE {
+ * beforeCount INTEGER (0..maxInt),
+ * afterCount INTEGER (0..maxInt),
+ * target CHOICE {
+ * byOffset [0] SEQUENCE {
+ * offset INTEGER (1 .. maxInt),
+ * contentCount INTEGER (0 .. maxInt) },
+ * greaterThanOrEqual [1] AssertionValue },
+ * contextID OCTET STRING OPTIONAL }
+ *
+ * Simplistic implementation that only supports byOffset choice.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class VirtualListViewRequestImpl extends AbstractControl implements VirtualListViewRequest
+{
+ private int beforeCount;
+ private int afterCount;
+ private int offset;
+ private int contentCount;
+ private byte[] contextId;
+
+ /** The assertionValue */
+ private byte[] assertionValue;
+
+ /** A flag used for the target. It default to OFFSET */
+ private boolean targetType = OFFSET;
+
+ private static final boolean OFFSET = true;
+ private static final boolean ASSERTION_VALUE = false;
+
+
+ /**
+ * Creates a new instance of VirtualListViewRequestImpl.
+ */
+ public VirtualListViewRequestImpl()
+ {
+ super( OID );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getBeforeCount()
+ {
+ return beforeCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setBeforeCount( int beforeCount )
+ {
+ this.beforeCount = beforeCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getAfterCount()
+ {
+ return afterCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setAfterCount( int afterCount )
+ {
+ this.afterCount = afterCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getOffset()
+ {
+ return offset;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setOffset( int offset )
+ {
+ this.offset = offset;
+ targetType = OFFSET;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getContentCount()
+ {
+ return contentCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setContentCount( int contentCount )
+ {
+ this.contentCount = contentCount;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public byte[] getAssertionValue()
+ {
+ return assertionValue;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setAssertionValue( byte[] assertionValue )
+ {
+ this.assertionValue = assertionValue;
+ targetType = ASSERTION_VALUE;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public byte[] getContextId()
+ {
+ return contextId;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setContextId( byte[] contextId )
+ {
+ this.contextId = contextId;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasOffset()
+ {
+ return targetType == OFFSET;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasAssertionValue()
+ {
+ return targetType == ASSERTION_VALUE;
+ }
+
+
+ /**
+ * @see Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ int h = super.hashCode();
+
+ h = h * 37 + beforeCount;
+ h = h * 37 + afterCount;
+ h = h * 37 + offset;
+ h = h * 37 + contentCount;
+
+ if ( contextId != null )
+ {
+ for ( byte b : contextId )
+ {
+ h = h * 17 + b;
+ }
+ }
+
+ return h;
+ }
+
+
+ /**
+ * @see Object#equals(Object)
+ */
+ @Override
+ public boolean equals( Object o )
+ {
+ if ( !super.equals( o ) )
+ {
+ return false;
+ }
+
+ VirtualListViewRequestImpl otherControl = ( VirtualListViewRequestImpl ) o;
+
+ return ( beforeCount == otherControl.getBeforeCount() ) &&
+ ( afterCount == otherControl.getAfterCount() ) &&
+ ( offset == otherControl.getOffset() ) &&
+ ( contentCount == otherControl.getContentCount() ) &&
+ Arrays.equals( contextId, otherControl.getContextId() );
+ }
+
+
+ /**
+ * Return a String representing this VirtualListViewRequestImpl.
+ */
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer();
+
+ sb.append( " Virtual List View Request Control\n" );
+ sb.append( " oid : " ).append( getOid() ).append( '\n' );
+ sb.append( " critical : " ).append( isCritical() ).append( '\n' );
+ sb.append( " beforeCount : '" ).append( beforeCount ).append( "'\n" );
+ sb.append( " afterCount : '" ).append( afterCount ).append( "'\n" );
+ sb.append( " target : \n" );
+
+ if ( targetType == OFFSET )
+ {
+ sb.append( " offset : '" ).append( offset ).append( "'\n" );
+ sb.append( " contentCount : '" ).append( contentCount ).append( "'\n" );
+ }
+ else
+ {
+ sb.append( " assertionValue : '" ).append( Strings.utf8ToString( assertionValue ) )
+ .append( "'\n" );
+
+ }
+
+ if ( contextId != null )
+ {
+ sb.append( " contextID : '" ).append( Strings.dumpBytes( contextId ) ).append( "'\n" );
+ }
+
+ return sb.toString();
+ }
+}
Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java?rev=1664660&r1=1664659&r2=1664660&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/ExtrasBundleActivator.java Fri Mar 6 15:36:15 2015
@@ -34,6 +34,8 @@ import org.apache.directory.api.ldap.ext
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory;
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory;
import org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest;
+import org.apache.directory.api.ldap.extras.controls.vlv_impl.VirtualListViewRequestFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory;
import org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory;
@@ -111,12 +113,13 @@ public class ExtrasBundleActivator imple
*/
public void start( BundleContext context ) throws Exception
{
- LdapApiServiceTracker ldapApiServiceTracker = new LdapApiServiceTracker(context);
+ LdapApiServiceTracker ldapApiServiceTracker = new LdapApiServiceTracker( context );
serviceTracker = new ServiceTracker<LdapApiService, LdapApiService>(
context, LdapApiService.class, ldapApiServiceTracker );
serviceTracker.open();
}
-
+
+
/**
* Registers all the extras controls present in this control pack.
*
@@ -139,6 +142,9 @@ public class ExtrasBundleActivator imple
ControlFactory<PasswordPolicy> passwordPolicyFactory = new PasswordPolicyFactory( codec );
codec.registerControl( passwordPolicyFactory );
+ ControlFactory<VirtualListViewRequest> virtualListViewRequestFactory = new VirtualListViewRequestFactory( codec );
+ codec.registerControl( virtualListViewRequestFactory );
+
ControlFactory<AdDirSync> adDirSyncFactory = new AdDirSyncFactory( codec );
codec.registerControl( adDirSyncFactory );
}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitByOffsetSequence.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.DecoderException;
+import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the ByOffset sequence object
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitByOffsetSequence extends GrammarAction<VirtualListViewRequestContainer>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( InitByOffsetSequence.class );
+
+ /** Speedup for logs */
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+ /**
+ * Instantiates a new ByOffsetSequence action.
+ */
+ public InitByOffsetSequence()
+ {
+ super( "Initialize the ByOffsetSequence action" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( VirtualListViewRequestContainer container ) throws DecoderException
+ {
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "VirtualListViewRequestContainer initialized" );
+ }
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/InitVirtualListViewRequest.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.DecoderException;
+import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the VirtualListViewRequestContainer object
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitVirtualListViewRequest extends GrammarAction<VirtualListViewRequestContainer>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( InitVirtualListViewRequest.class );
+
+ /** Speedup for logs */
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+ /**
+ * Instantiates a new VirtualListViewRequest action.
+ */
+ public InitVirtualListViewRequest()
+ {
+ super( "Initialize the VirtualListViewRequestContainer" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( VirtualListViewRequestContainer container ) throws DecoderException
+ {
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "VirtualListViewRequestContainer initialized" );
+ }
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAfterCount.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAfterCount.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAfterCount.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAfterCount.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadInteger;
+
+
+/**
+ * The action used to store the AfterCount value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreAfterCount extends AbstractReadInteger<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new afterCount action.
+ */
+ public StoreAfterCount()
+ {
+ super( "VirtualListViewRequest AfterCount" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setIntegerValue( int value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setAfterCount( value );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAssertionValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAssertionValue.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAssertionValue.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreAssertionValue.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadOctetString;
+
+
+/**
+ * The action used to store the assertionValue value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreAssertionValue extends AbstractReadOctetString<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new assertionValue action.
+ */
+ public StoreAssertionValue()
+ {
+ super( "VirtualListViewRequest offset" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setOctetString( byte[] value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setAssertionValue( value );
+
+ // The last element is optional, we can quit here
+ vlvContainer.setGrammarEndAllowed( true );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreBeforeCount.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreBeforeCount.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreBeforeCount.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreBeforeCount.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadInteger;
+
+
+/**
+ * The action used to store the BeforeCount value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreBeforeCount extends AbstractReadInteger<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new beforeCount action.
+ */
+ public StoreBeforeCount()
+ {
+ super( "VirtualListViewRequest BeforeCount" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setIntegerValue( int value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setBeforeCount( value );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContentCount.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContentCount.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContentCount.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContentCount.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadInteger;
+
+
+/**
+ * The action used to store the ContentCount value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreContentCount extends AbstractReadInteger<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new ContentCount action.
+ */
+ public StoreContentCount()
+ {
+ super( "VirtualListViewRequest ContentCount" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setIntegerValue( int value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setContentCount( value );
+
+ // The last element is optional, we can quit here
+ vlvContainer.setGrammarEndAllowed( true );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContextId.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContextId.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContextId.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreContextId.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadOctetString;
+
+
+/**
+ * The action used to store the ContextId value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreContextId extends AbstractReadOctetString<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new ContextId action.
+ */
+ public StoreContextId()
+ {
+ super( "VirtualListViewRequest ContextId" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setOctetString( byte[] value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setContextId( value );
+
+ // The last element is optional, we can quit here
+ vlvContainer.setGrammarEndAllowed( true );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreOffset.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreOffset.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreOffset.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/StoreOffset.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.actions.AbstractReadInteger;
+
+
+/**
+ * The action used to store the Offset value
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreOffset extends AbstractReadInteger<VirtualListViewRequestContainer>
+{
+
+ /**
+ * Instantiates a new offset action.
+ */
+ public StoreOffset()
+ {
+ super( "VirtualListViewRequest offset" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setIntegerValue( int value, VirtualListViewRequestContainer vlvContainer )
+ {
+ vlvContainer.getDecorator().setOffset( value );
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestContainer.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestContainer.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestContainer.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.ber.AbstractContainer;
+import org.apache.directory.api.ldap.codec.api.LdapApiService;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest;
+
+
+/**
+ * A container for the VLV request control.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class VirtualListViewRequestContainer extends AbstractContainer
+{
+ private VirtualListViewRequestDecorator control;
+
+ private LdapApiService codec;
+
+
+ public VirtualListViewRequestContainer( LdapApiService codec )
+ {
+ super();
+ this.codec = codec;
+ grammar = VirtualListViewRequestGrammar.getInstance();
+ setTransition( VirtualListViewRequestStates.START_STATE );
+ }
+
+
+ public VirtualListViewRequestContainer( VirtualListViewRequestDecorator control, LdapApiService codec )
+ {
+ this( codec );
+ decorate( control );
+ }
+
+
+ public VirtualListViewRequestDecorator getDecorator()
+ {
+ return control;
+ }
+
+
+ public void decorate( VirtualListViewRequest control )
+ {
+ if ( control instanceof VirtualListViewRequestDecorator )
+ {
+ this.control = ( VirtualListViewRequestDecorator ) control;
+ }
+ else
+ {
+ this.control = new VirtualListViewRequestDecorator( codec, control );
+ }
+ }
+
+
+ public void setVirtualListViewRequestControl( VirtualListViewRequestDecorator control )
+ {
+ this.control = control;
+ }
+
+
+ public void clean()
+ {
+ super.clean();
+ control = null;
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestDecorator.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestDecorator.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestDecorator.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,325 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import java.nio.ByteBuffer;
+
+import org.apache.directory.api.asn1.Asn1Object;
+import org.apache.directory.api.asn1.DecoderException;
+import org.apache.directory.api.asn1.EncoderException;
+import org.apache.directory.api.asn1.ber.Asn1Decoder;
+import org.apache.directory.api.asn1.ber.tlv.BerValue;
+import org.apache.directory.api.asn1.ber.tlv.TLV;
+import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
+import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.codec.api.ControlDecorator;
+import org.apache.directory.api.ldap.codec.api.LdapApiService;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequestImpl;
+
+
+/**
+ * The VirtualListView decorator
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class VirtualListViewRequestDecorator extends ControlDecorator<VirtualListViewRequest> implements
+ VirtualListViewRequest
+{
+ private int vlvSeqLength;
+ private int targetSeqLength;
+
+ private static final Asn1Decoder decoder = new Asn1Decoder();
+
+
+ public VirtualListViewRequestDecorator( LdapApiService codec )
+ {
+ this( codec, new VirtualListViewRequestImpl() );
+ }
+
+
+ public VirtualListViewRequestDecorator( LdapApiService codec, VirtualListViewRequest vlvRequest )
+ {
+ super( codec, vlvRequest );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public int computeLength()
+ {
+ vlvSeqLength = 1 + 1 + BerValue.getNbBytes( getBeforeCount() );
+ vlvSeqLength += 1 + 1 + BerValue.getNbBytes( getAfterCount() );
+
+ if ( hasOffset() )
+ {
+ targetSeqLength = 1 + 1 + BerValue.getNbBytes( getOffset() );
+ targetSeqLength += 1 + 1 + BerValue.getNbBytes( getContentCount() );
+
+ vlvSeqLength += 1 + 1 + targetSeqLength;
+ }
+ else
+ {
+ byte[] assertionValue = getAssertionValue();
+
+ if ( assertionValue != null )
+ {
+ vlvSeqLength += 1 + TLV.getNbBytes( assertionValue.length ) + assertionValue.length;
+ }
+ else
+ {
+ vlvSeqLength += 1 + 1;
+ }
+ }
+
+ if ( getContextId() != null )
+ {
+ vlvSeqLength = 1 + TLV.getNbBytes( getContextId().length ) + getContextId().length;
+ }
+
+ valueLength = 1 + TLV.getNbBytes( vlvSeqLength ) + vlvSeqLength;
+
+ return valueLength;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+ {
+ if ( buffer == null )
+ {
+ throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
+ }
+
+ buffer.put( UniversalTag.SEQUENCE.getValue() );
+ buffer.put( TLV.getBytes( vlvSeqLength ) );
+
+ BerValue.encode( buffer, getBeforeCount() );
+ BerValue.encode( buffer, getAfterCount() );
+
+ if ( hasOffset() )
+ {
+ // The byOffset tag
+ buffer.put( ( byte ) VirtualListViewerTags.BY_OFFSET_TAG.getValue() );
+ buffer.put( TLV.getBytes( targetSeqLength ) );
+
+ // The by offset values
+ BerValue.encode( buffer, getOffset() );
+ BerValue.encode( buffer, getContentCount() );
+ }
+ else
+ {
+ buffer.put( ( byte ) VirtualListViewerTags.ASSERTION_VALUE_TAG.getValue() );
+ buffer.put( TLV.getBytes( targetSeqLength ) );
+
+ // The by assertionValue values
+ BerValue.encode( buffer, getAssertionValue() );
+ }
+
+ if ( getContextId() != null )
+ {
+ BerValue.encode( buffer, getContextId() );
+ }
+
+ return buffer;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getValue()
+ {
+ if ( value == null )
+ {
+ try
+ {
+ computeLength();
+ ByteBuffer buffer = ByteBuffer.allocate( valueLength );
+
+ value = encode( buffer ).array();
+ }
+ catch ( Exception e )
+ {
+ return null;
+ }
+ }
+
+ return value;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Asn1Object decode( byte[] controlBytes ) throws DecoderException
+ {
+ ByteBuffer buffer = ByteBuffer.wrap( controlBytes );
+ VirtualListViewRequestContainer container = new VirtualListViewRequestContainer( this, getCodecService() );
+ decoder.decode( buffer, container );
+ return this;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getBeforeCount()
+ {
+ return getDecorated().getBeforeCount();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setBeforeCount( int beforeCount )
+ {
+ getDecorated().setBeforeCount( beforeCount );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getAfterCount()
+ {
+ return getDecorated().getAfterCount();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setAfterCount( int afterCount )
+ {
+ getDecorated().setAfterCount( afterCount );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getOffset()
+ {
+ return getDecorated().getOffset();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setOffset( int offset )
+ {
+ getDecorated().setOffset( offset );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getContentCount()
+ {
+ return getDecorated().getContentCount();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setContentCount( int contentCount )
+ {
+ getDecorated().setContentCount( contentCount );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public byte[] getContextId()
+ {
+ return getDecorated().getContextId();
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setContextId( byte[] contextId )
+ {
+ getDecorated().setContextId( contextId );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public byte[] getAssertionValue()
+ {
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setAssertionValue( byte[] assertionValue )
+ {
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasOffset()
+ {
+ return false;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasAssertionValue()
+ {
+ return false;
+ }
+
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestFactory.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestFactory.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestFactory.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.ldap.codec.api.CodecControl;
+import org.apache.directory.api.ldap.codec.api.ControlFactory;
+import org.apache.directory.api.ldap.codec.api.LdapApiService;
+import org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest;
+
+
+/**
+ * A {@link ControlFactory} for {@link VirtualListViewRequest} controls.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class VirtualListViewRequestFactory implements ControlFactory<VirtualListViewRequest>
+{
+ private LdapApiService codec;
+
+
+ public VirtualListViewRequestFactory( LdapApiService codec )
+ {
+ this.codec = codec;
+ }
+
+
+ @Override
+ public String getOid()
+ {
+ return VirtualListViewRequest.OID;
+ }
+
+
+ @Override
+ public CodecControl<VirtualListViewRequest> newCodecControl()
+ {
+ return new VirtualListViewRequestDecorator( codec );
+ }
+
+
+ @Override
+ public CodecControl<VirtualListViewRequest> newCodecControl( VirtualListViewRequest control )
+ {
+ return new VirtualListViewRequestDecorator( codec, control );
+ }
+
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestGrammar.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.ber.grammar.AbstractGrammar;
+import org.apache.directory.api.asn1.ber.grammar.Grammar;
+import org.apache.directory.api.asn1.ber.grammar.GrammarTransition;
+import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * TODO VirtualListViewRequestGrammar.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class VirtualListViewRequestGrammar extends AbstractGrammar<VirtualListViewRequestContainer>
+{
+ static final Logger LOG = LoggerFactory.getLogger( VirtualListViewRequestGrammar.class );
+
+ static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+ private static Grammar<?> instance = new VirtualListViewRequestGrammar();
+
+
+ @SuppressWarnings("unchecked")
+ private VirtualListViewRequestGrammar()
+ {
+ setName( VirtualListViewRequestGrammar.class.getName() );
+
+ super.transitions = new GrammarTransition[VirtualListViewRequestStates.END_STATE.ordinal()][256];
+
+ super.transitions[VirtualListViewRequestStates.START_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.START_STATE,
+ VirtualListViewRequestStates.VLV_SEQUENCE_STATE,
+ UniversalTag.SEQUENCE.getValue(),
+ null );
+
+ super.transitions[VirtualListViewRequestStates.VLV_SEQUENCE_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_SEQUENCE_STATE,
+ VirtualListViewRequestStates.VLV_BEFORE_COUNT_STATE,
+ UniversalTag.INTEGER.getValue(),
+ new StoreBeforeCount() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_BEFORE_COUNT_STATE.ordinal()][UniversalTag.INTEGER
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_BEFORE_COUNT_STATE,
+ VirtualListViewRequestStates.VLV_AFTER_COUNT_STATE,
+ UniversalTag.INTEGER.getValue(),
+ new StoreAfterCount() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_AFTER_COUNT_STATE.ordinal()][( byte ) VirtualListViewerTags.BY_OFFSET_TAG
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_AFTER_COUNT_STATE,
+ VirtualListViewRequestStates.VLV_TARGET_BY_OFFSET_STATE,
+ ( byte ) VirtualListViewerTags.BY_OFFSET_TAG.getValue(),
+ null );
+
+ super.transitions[VirtualListViewRequestStates.VLV_AFTER_COUNT_STATE.ordinal()][( byte ) VirtualListViewerTags.ASSERTION_VALUE_TAG
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_AFTER_COUNT_STATE,
+ VirtualListViewRequestStates.VLV_ASSERTION_VALUE_STATE,
+ ( byte ) VirtualListViewerTags.ASSERTION_VALUE_TAG.getValue(),
+ new StoreAssertionValue() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_TARGET_BY_OFFSET_STATE.ordinal()][UniversalTag.INTEGER
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_TARGET_BY_OFFSET_STATE,
+ VirtualListViewRequestStates.VLV_OFFSET_STATE,
+ UniversalTag.INTEGER.getValue(),
+ new StoreOffset() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_OFFSET_STATE.ordinal()][UniversalTag.INTEGER.getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_OFFSET_STATE,
+ VirtualListViewRequestStates.VLV_CONTENT_COUNT_STATE,
+ UniversalTag.INTEGER.getValue(),
+ new StoreContentCount() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_CONTENT_COUNT_STATE.ordinal()][UniversalTag.OCTET_STRING
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_CONTENT_COUNT_STATE,
+ VirtualListViewRequestStates.VLV_CONTEXT_ID_STATE,
+ UniversalTag.OCTET_STRING.getValue(),
+ new StoreContextId() );
+
+ super.transitions[VirtualListViewRequestStates.VLV_ASSERTION_VALUE_STATE.ordinal()][UniversalTag.OCTET_STRING
+ .getValue()] =
+ new GrammarTransition<VirtualListViewRequestContainer>(
+ VirtualListViewRequestStates.VLV_ASSERTION_VALUE_STATE,
+ VirtualListViewRequestStates.VLV_CONTEXT_ID_STATE,
+ UniversalTag.OCTET_STRING.getValue(),
+ new StoreContextId() );
+ }
+
+
+ public static Grammar<?> getInstance()
+ {
+ return instance;
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestStates.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestStates.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestStates.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewRequestStates.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+import org.apache.directory.api.asn1.ber.grammar.Grammar;
+import org.apache.directory.api.asn1.ber.grammar.States;
+
+
+/**
+ * This class store the VirtualListViewRequest grammar constants. It is also used for
+ * debugging purposes.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum VirtualListViewRequestStates implements States
+{
+ START_STATE,
+ VLV_SEQUENCE_STATE,
+ VLV_BEFORE_COUNT_STATE,
+ VLV_AFTER_COUNT_STATE,
+ VLV_TARGET_BY_OFFSET_STATE,
+ VLV_OFFSET_STATE,
+ VLV_CONTENT_COUNT_STATE,
+ VLV_CONTEXT_ID_STATE,
+ VLV_ASSERTION_VALUE_STATE,
+ END_STATE;
+
+ public String getGrammarName( int grammar )
+ {
+ return "VLV_REQUEST_GRAMMAR";
+ }
+
+
+ public String getGrammarName( Grammar<?> grammar )
+ {
+ if ( grammar instanceof VirtualListViewRequestGrammar )
+ {
+ return "VLV_REQUEST_GRAMMAR";
+ }
+
+ return "UNKNOWN GRAMMAR";
+ }
+
+
+ public String getState( int state )
+ {
+ return ( ( state == END_STATE.ordinal() ) ? "VLV_REQUEST_END_STATE" : name() );
+ }
+
+
+ @Override
+ public boolean isEndState()
+ {
+ return this == END_STATE;
+ }
+
+
+ @Override
+ public Enum<?> getStartState()
+ {
+ return START_STATE;
+ }
+}
Added: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewerTags.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewerTags.java?rev=1664660&view=auto
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewerTags.java (added)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/api/ldap/extras/controls/vlv_impl/VirtualListViewerTags.java Fri Mar 6 15:36:15 2015
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.api.ldap.extras.controls.vlv_impl;
+
+
+/**
+ * Tags used for decoding VirtualListViewerRequest.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum VirtualListViewerTags
+{
+ BY_OFFSET_TAG(0xA0), // byOffset [0]
+ ASSERTION_VALUE_TAG(0x81); // greaterThanOrEqual [1]
+
+ /** Internal value for each tag */
+ private int value;
+
+
+ private VirtualListViewerTags( int value )
+ {
+ this.value = value;
+ }
+
+
+ public int getValue()
+ {
+ return value;
+ }
+}
Re: svn commit: r1664660 - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/api/ldap/codec/api/
ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/
ldap/codec/standalone/src/test/java/org/apache/directory...
Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 03/08/2015 08:14 AM, Emmanuel Lécharny wrote:
> Le 06/03/15 20:39, Stefan Seelmann a écrit :
>> On 03/06/2015 04:36 PM, elecharny@apache.org wrote:
>>> Author: elecharny
>>> Date: Fri Mar 6 15:36:15 2015
>>> New Revision: 1664660
>>>
>>> URL: http://svn.apache.org/r1664660
>>> Log:
>>> Added the VLV codec using Radovan's code
>> Sorry for nitpicking,
> don't be !
>
>> but did Radovan explicitely state that he wants to
>> contributes his code?
>
> "
> I would suggest this: let me finish my rudimentary implementation. Now I
> have to speed things up a bit, so it probably won't take longer than a
> week or two. I'm using VLV and schema in my LDAP connector for midPoint.
> I'm also working on automated tests that will use
> midPoint+connector+directory API with OpenLDAP and 389ds (I already have
> tests for OpenDJ). Once I have that then I will create a pull request so
> it can get to the directory API project trunk. The code will probably be
> a bit ugly ... but once it is in trunk you are free to clean it up. And
> as I will have the tests I can check that it still works after your
> cleanup ..."é
>
> Is that enough ? I can ask Radovan for an explicit aknoledgment otherwie.
Yes, that would have been enough, sorry that I missed it. Thanks for
asking anyway.
Kind Regards,
Stefan
Re: svn commit: r1664660 - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/api/ldap/codec/api/
ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/
ldap/codec/standalone/src/test/java/org/apache/directory...
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 06/03/15 20:39, Stefan Seelmann a écrit :
> On 03/06/2015 04:36 PM, elecharny@apache.org wrote:
>> Author: elecharny
>> Date: Fri Mar 6 15:36:15 2015
>> New Revision: 1664660
>>
>> URL: http://svn.apache.org/r1664660
>> Log:
>> Added the VLV codec using Radovan's code
> Sorry for nitpicking,
don't be !
> but did Radovan explicitely state that he wants to
> contributes his code?
"
I would suggest this: let me finish my rudimentary implementation. Now I
have to speed things up a bit, so it probably won't take longer than a
week or two. I'm using VLV and schema in my LDAP connector for midPoint.
I'm also working on automated tests that will use
midPoint+connector+directory API with OpenLDAP and 389ds (I already have
tests for OpenDJ). Once I have that then I will create a pull request so
it can get to the directory API project trunk. The code will probably be
a bit ugly ... but once it is in trunk you are free to clean it up. And
as I will have the tests I can check that it still works after your
cleanup ..."é
Is that enough ? I can ask Radovan for an explicit aknoledgment otherwie.
Thanks Stefan !
Re: svn commit: r1664660 - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/api/ldap/codec/api/
ldap/codec/standalone/src/main/java/org/apache/directory/api/ldap/codec/standalone/
ldap/codec/standalone/src/test/java/org/apache/directory...
Posted by Stefan Seelmann <ma...@stefan-seelmann.de>.
On 03/06/2015 04:36 PM, elecharny@apache.org wrote:
> Author: elecharny
> Date: Fri Mar 6 15:36:15 2015
> New Revision: 1664660
>
> URL: http://svn.apache.org/r1664660
> Log:
> Added the VLV codec using Radovan's code
Sorry for nitpicking, but did Radovan explicitely state that he wants to
contributes his code?
Kind Regards,
Stefan