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 2011/02/10 00:28:21 UTC
svn commit: r1069168 - in
/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec:
./ actions/ actions/addRequest/ actions/controls/ actions/extendedRequest/
actions/extendedResponse/ actions/modifyRequest/ actions...
Author: elecharny
Date: Wed Feb 9 23:28:20 2011
New Revision: 1069168
URL: http://svn.apache.org/viewvc?rev=1069168&view=rev
Log:
Moved some more actions
Added:
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/AddAttributeValue.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlValueAction.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/InitExtendedRequest.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/InitExtendedResponse.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreResponseName.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/StoreModifyRequestAttributeValue.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultEntry/SearchResultAttributeValueAction.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/InitSearchResultReference.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/StoreReferenceAction.java
- copied, changed from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
Removed:
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java
Modified:
directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Modified: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1069168&r1=1069167&r2=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Wed Feb 9 23:28:20 2011
@@ -45,7 +45,6 @@ import org.apache.directory.shared.asn1.
import org.apache.directory.shared.i18n.I18n;
import org.apache.directory.shared.ldap.codec.actions.AllowGrammarEnd;
import org.apache.directory.shared.ldap.codec.actions.AttributeDescAction;
-import org.apache.directory.shared.ldap.codec.actions.ControlValueAction;
import org.apache.directory.shared.ldap.codec.actions.InitAndFilterAction;
import org.apache.directory.shared.ldap.codec.actions.InitApproxMatchFilterAction;
import org.apache.directory.shared.ldap.codec.actions.InitAssertionValueFilterAction;
@@ -59,18 +58,14 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.codec.actions.InitOrFilterAction;
import org.apache.directory.shared.ldap.codec.actions.InitPresentFilterAction;
import org.apache.directory.shared.ldap.codec.actions.InitSubstringsFilterAction;
-import org.apache.directory.shared.ldap.codec.actions.ModifyAttributeValueAction;
import org.apache.directory.shared.ldap.codec.actions.ResponseAction;
-import org.apache.directory.shared.ldap.codec.actions.ResponseNameAction;
-import org.apache.directory.shared.ldap.codec.actions.SearchResultAttributeValueAction;
import org.apache.directory.shared.ldap.codec.actions.StoreAnyAction;
import org.apache.directory.shared.ldap.codec.actions.StoreFinalAction;
import org.apache.directory.shared.ldap.codec.actions.StoreMatchValueAction;
-import org.apache.directory.shared.ldap.codec.actions.StoreReferenceAction;
import org.apache.directory.shared.ldap.codec.actions.StoreTypeMatchingRuleAction;
-import org.apache.directory.shared.ldap.codec.actions.ValueAction;
import org.apache.directory.shared.ldap.codec.actions.abandonRequest.InitAbandonRequest;
import org.apache.directory.shared.ldap.codec.actions.addRequest.AddAddRequestAttributeType;
+import org.apache.directory.shared.ldap.codec.actions.addRequest.AddAttributeValue;
import org.apache.directory.shared.ldap.codec.actions.addRequest.InitAddRequest;
import org.apache.directory.shared.ldap.codec.actions.addRequest.StoreAddRequestEntryName;
import org.apache.directory.shared.ldap.codec.actions.addResponse.InitAddResponse;
@@ -88,9 +83,15 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.codec.actions.compareRequest.StoreCompareRequestAttributeDesc;
import org.apache.directory.shared.ldap.codec.actions.compareRequest.StoreCompareRequestEntryName;
import org.apache.directory.shared.ldap.codec.actions.compareResponse.InitCompareResponse;
+import org.apache.directory.shared.ldap.codec.actions.controls.ControlValueAction;
import org.apache.directory.shared.ldap.codec.actions.controls.InitControls;
import org.apache.directory.shared.ldap.codec.actions.delRequest.InitDelRequest;
import org.apache.directory.shared.ldap.codec.actions.delResponse.InitDelResponse;
+import org.apache.directory.shared.ldap.codec.actions.extendedRequest.InitExtendedRequest;
+import org.apache.directory.shared.ldap.codec.actions.extendedRequest.StoreExtendedRequestName;
+import org.apache.directory.shared.ldap.codec.actions.extendedRequest.StoreExtendedRequestValue;
+import org.apache.directory.shared.ldap.codec.actions.extendedResponse.InitExtendedResponse;
+import org.apache.directory.shared.ldap.codec.actions.extendedResponse.StoreResponseName;
import org.apache.directory.shared.ldap.codec.actions.ldapMessage.InitLdapMessage;
import org.apache.directory.shared.ldap.codec.actions.ldapMessage.StoreMessageId;
import org.apache.directory.shared.ldap.codec.actions.ldapResult.AddReferral;
@@ -107,31 +108,29 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.codec.actions.modifyRequest.AddModifyRequestAttribute;
import org.apache.directory.shared.ldap.codec.actions.modifyRequest.InitAttributeVals;
import org.apache.directory.shared.ldap.codec.actions.modifyRequest.InitModifyRequest;
+import org.apache.directory.shared.ldap.codec.actions.modifyRequest.StoreModifyRequestAttributeValue;
import org.apache.directory.shared.ldap.codec.actions.modifyRequest.StoreModifyRequestObjectName;
import org.apache.directory.shared.ldap.codec.actions.modifyRequest.StoreOperationType;
import org.apache.directory.shared.ldap.codec.actions.modifyResponse.InitModifyResponse;
import org.apache.directory.shared.ldap.codec.actions.searchResultDone.InitSearchResultDone;
import org.apache.directory.shared.ldap.codec.actions.searchResultEntry.AddAttributeType;
import org.apache.directory.shared.ldap.codec.actions.searchResultEntry.InitSearchResultEntry;
+import org.apache.directory.shared.ldap.codec.actions.searchResultEntry.SearchResultAttributeValueAction;
import org.apache.directory.shared.ldap.codec.actions.searchResultEntry.StoreSearchResultEntryObjectName;
+import org.apache.directory.shared.ldap.codec.actions.searchResultReference.InitSearchResultReference;
+import org.apache.directory.shared.ldap.codec.actions.searchResultReference.StoreReferenceAction;
import org.apache.directory.shared.ldap.codec.actions.unbindRequest.InitUnbindRequest;
import org.apache.directory.shared.ldap.codec.api.LdapConstants;
import org.apache.directory.shared.ldap.codec.api.ResponseCarryingException;
-import org.apache.directory.shared.ldap.codec.decorators.ExtendedRequestDecorator;
-import org.apache.directory.shared.ldap.codec.decorators.ExtendedResponseDecorator;
import org.apache.directory.shared.ldap.codec.decorators.IntermediateResponseDecorator;
import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
import org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator;
-import org.apache.directory.shared.ldap.codec.decorators.SearchResultReferenceDecorator;
import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
import org.apache.directory.shared.ldap.model.filter.SearchScope;
import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
-import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
import org.apache.directory.shared.ldap.model.message.IntermediateResponseImpl;
import org.apache.directory.shared.ldap.model.message.Message;
@@ -139,7 +138,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.model.message.SearchRequest;
import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
import org.apache.directory.shared.ldap.model.message.SearchResultDoneImpl;
-import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
import org.apache.directory.shared.ldap.model.name.Dn;
import org.apache.directory.shared.util.StringConstants;
import org.apache.directory.shared.util.Strings;
@@ -1164,7 +1162,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.VALS_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
OCTET_STRING,
- new ModifyAttributeValueAction() );
+ new StoreModifyRequestAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from vals to ModificationsSeq
@@ -1224,7 +1222,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
LdapStatesEnum.ATTRIBUTE_VALUE_STATE,
OCTET_STRING,
- new ModifyAttributeValueAction() );
+ new StoreModifyRequestAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Attribute Value to ModificationsSeq
@@ -1397,7 +1395,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.VALUES_STATE,
LdapStatesEnum.VALUE_STATE,
OCTET_STRING,
- new ValueAction() );
+ new AddAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Value to Value
@@ -1414,7 +1412,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.VALUE_STATE,
LdapStatesEnum.VALUE_STATE,
OCTET_STRING,
- new ValueAction() );
+ new AddAttributeValue() );
// --------------------------------------------------------------------------------------------
// Transition from Value to Attribute
@@ -1781,20 +1779,12 @@ public final class LdapMessageGrammar<E>
// SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
//
// Initialization of SearchResultReference object
- super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.SEARCH_RESULT_REFERENCE_TAG] = new GrammarTransition(
- LdapStatesEnum.MESSAGE_ID_STATE, LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE,
- LdapConstants.SEARCH_RESULT_REFERENCE_TAG, new GrammarAction<LdapMessageContainer<SearchResultReferenceDecorator>>( "Init SearchResultReference" )
- {
- public void action( LdapMessageContainer<SearchResultReferenceDecorator> container ) throws DecoderException
- {
- // Now, we can allocate the SearchResultReference Object
- SearchResultReferenceDecorator searchResultReference = new SearchResultReferenceDecorator(
- container.getLdapCodecService(), new SearchResultReferenceImpl( container.getMessageId() ) );
- container.setMessage( searchResultReference );
-
- LOG.debug( "SearchResultReference response " );
- }
- } );
+ super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.SEARCH_RESULT_REFERENCE_TAG] =
+ new GrammarTransition(
+ LdapStatesEnum.MESSAGE_ID_STATE,
+ LdapStatesEnum.SEARCH_RESULT_REFERENCE_STATE,
+ LdapConstants.SEARCH_RESULT_REFERENCE_TAG,
+ new InitSearchResultReference() );
// --------------------------------------------------------------------------------------------
// Transition from SearchResultReference Message to Reference
@@ -1846,20 +1836,12 @@ public final class LdapMessageGrammar<E>
// ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
//
// Creates the ExtendedRequest object
- super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_TAG] = new GrammarTransition(
- LdapStatesEnum.MESSAGE_ID_STATE, LdapStatesEnum.EXTENDED_REQUEST_STATE, LdapConstants.EXTENDED_REQUEST_TAG,
- new GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>( "Init Extended Request" )
- {
- public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
- {
- // Now, we can allocate the ExtendedRequest Object
- ExtendedRequestDecorator extendedRequest = new ExtendedRequestDecorator(
- container.getLdapCodecService(), new ExtendedRequestImpl( container.getMessageId() ) );
- container.setMessage( extendedRequest );
-
- LOG.debug( "Extended request" );
- }
- } );
+ super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_TAG] =
+ new GrammarTransition(
+ LdapStatesEnum.MESSAGE_ID_STATE,
+ LdapStatesEnum.EXTENDED_REQUEST_STATE,
+ LdapConstants.EXTENDED_REQUEST_TAG,
+ new InitExtendedRequest() );
// --------------------------------------------------------------------------------------------
// Transition from ExtendedRequest Message to RequestName
@@ -1869,70 +1851,12 @@ public final class LdapMessageGrammar<E>
// ...
//
// Stores the name
- super.transitions[LdapStatesEnum.EXTENDED_REQUEST_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_NAME_TAG] = new GrammarTransition(
- LdapStatesEnum.EXTENDED_REQUEST_STATE, LdapStatesEnum.REQUEST_NAME_STATE,
- LdapConstants.EXTENDED_REQUEST_NAME_TAG, new GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>( "Store name" )
- {
- public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
- {
- // We can allocate the ExtendedRequest Object
- ExtendedRequest extendedRequest = container.getMessage();
-
- // Get the Value and store it in the ExtendedRequest
- TLV tlv = container.getCurrentTLV();
-
- // We have to handle the special case of a 0 length matched
- // OID
- if ( tlv.getLength() == 0 )
- {
- String msg = I18n.err( I18n.ERR_04095 );
- LOG.error( msg );
- // This will generate a PROTOCOL_ERROR
- throw new DecoderException( msg );
- }
- else
- {
- byte[] requestNameBytes = tlv.getValue().getData();
-
- try
- {
- String requestName = Strings.utf8ToString(requestNameBytes);
-
- if ( !OID.isOID( requestName ) )
- {
-
- String msg = "The Request name is not a valid OID : "
- + Strings.utf8ToString(requestNameBytes) + " ("
- + Strings.dumpBytes(requestNameBytes) + ") is invalid";
- LOG.error( msg );
-
- // throw an exception, we will get a PROTOCOL_ERROR
- throw new DecoderException( msg );
- }
-
- extendedRequest.setRequestName( requestName );
- }
- catch ( DecoderException de )
- {
- String msg = "The Request name is not a valid OID : "
- + Strings.utf8ToString(requestNameBytes) + " ("
- + Strings.dumpBytes(requestNameBytes) + ") is invalid";
- LOG.error( "{} : {}", msg, de.getMessage() );
-
- // Rethrow the exception, we will get a PROTOCOL_ERROR
- throw de;
- }
- }
-
- // We can have an END transition
- container.setGrammarEndAllowed( true );
-
- if ( IS_DEBUG )
- {
- LOG.debug( "OID read : {}", extendedRequest.getRequestName() );
- }
- }
- } );
+ super.transitions[LdapStatesEnum.EXTENDED_REQUEST_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_NAME_TAG] =
+ new GrammarTransition(
+ LdapStatesEnum.EXTENDED_REQUEST_STATE,
+ LdapStatesEnum.REQUEST_NAME_STATE,
+ LdapConstants.EXTENDED_REQUEST_NAME_TAG,
+ new StoreExtendedRequestName() );
// --------------------------------------------------------------------------------------------
// Transition from RequestName to RequestValue
@@ -1942,38 +1866,12 @@ public final class LdapMessageGrammar<E>
// requestValue [1] OCTET STRING OPTIONAL }
//
// Stores the value
- super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_VALUE_TAG] = new GrammarTransition(
- LdapStatesEnum.REQUEST_NAME_STATE, LdapStatesEnum.REQUEST_VALUE_STATE,
- LdapConstants.EXTENDED_REQUEST_VALUE_TAG, new GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>( "Store value" )
- {
- public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
- {
- // We can allocate the ExtendedRequest Object
- ExtendedRequest extendedRequest = container.getMessage();
-
- // Get the Value and store it in the ExtendedRequest
- TLV tlv = container.getCurrentTLV();
-
- // We have to handle the special case of a 0 length matched
- // value
- if ( tlv.getLength() == 0 )
- {
- extendedRequest.setRequestValue( StringConstants.EMPTY_BYTES );
- }
- else
- {
- extendedRequest.setRequestValue( tlv.getValue().getData() );
- }
-
- // We can have an END transition
- container.setGrammarEndAllowed( true );
-
- if ( IS_DEBUG )
- {
- LOG.debug( "Extended value : {}", extendedRequest.getRequestValue() );
- }
- }
- } );
+ super.transitions[LdapStatesEnum.REQUEST_NAME_STATE.ordinal()][LdapConstants.EXTENDED_REQUEST_VALUE_TAG] =
+ new GrammarTransition(
+ LdapStatesEnum.REQUEST_NAME_STATE,
+ LdapStatesEnum.REQUEST_VALUE_STATE,
+ LdapConstants.EXTENDED_REQUEST_VALUE_TAG,
+ new StoreExtendedRequestValue() );
// --------------------------------------------------------------------------------------------
// Transition from RequestName to Controls
@@ -2012,20 +1910,12 @@ public final class LdapMessageGrammar<E>
// ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
//
// Creates the ExtendeResponse object
- super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_RESPONSE_TAG] = new GrammarTransition(
- LdapStatesEnum.MESSAGE_ID_STATE, LdapStatesEnum.EXTENDED_RESPONSE_STATE,
- LdapConstants.EXTENDED_RESPONSE_TAG, new GrammarAction<LdapMessageContainer<ExtendedResponseDecorator>>( "Init Extended Reponse" )
- {
- public void action( LdapMessageContainer<ExtendedResponseDecorator> container ) throws DecoderException
- {
- // Now, we can allocate the ExtendedResponse Object
- ExtendedResponseDecorator extendedResponse = new ExtendedResponseDecorator(
- container.getLdapCodecService(), new ExtendedResponseImpl( container.getMessageId() ) );
- container.setMessage( extendedResponse );
-
- LOG.debug( "Extended Response" );
- }
- } );
+ super.transitions[LdapStatesEnum.MESSAGE_ID_STATE.ordinal()][LdapConstants.EXTENDED_RESPONSE_TAG] =
+ new GrammarTransition(
+ LdapStatesEnum.MESSAGE_ID_STATE,
+ LdapStatesEnum.EXTENDED_RESPONSE_STATE,
+ LdapConstants.EXTENDED_RESPONSE_TAG,
+ new InitExtendedResponse() );
// --------------------------------------------------------------------------------------------
// Transition from ExtendedResponse Message to Result Code ER
@@ -2131,7 +2021,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.REFERRAL_ER_STATE,
LdapStatesEnum.RESPONSE_NAME_STATE,
LdapConstants.EXTENDED_RESPONSE_RESPONSE_NAME_TAG,
- new ResponseNameAction() );
+ new StoreResponseName() );
// --------------------------------------------------------------------------------------------
// Transition from Referral ER to Response
@@ -2193,7 +2083,7 @@ public final class LdapMessageGrammar<E>
LdapStatesEnum.ERROR_MESSAGE_ER_STATE,
LdapStatesEnum.RESPONSE_NAME_STATE,
LdapConstants.EXTENDED_RESPONSE_RESPONSE_NAME_TAG,
- new ResponseNameAction() );
+ new StoreResponseName() );
// --------------------------------------------------------------------------------------------
// Transition from Response Name to Response
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/AddAttributeValue.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/AddAttributeValue.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/AddAttributeValue.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ValueAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/addRequest/AddAttributeValue.java Wed Feb 9 23:28:20 2011
@@ -6,18 +6,18 @@
* 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.
- *
+ * under the License.
+ *
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.addRequest;
import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
@@ -31,13 +31,19 @@ import org.slf4j.LoggerFactory;
/**
* The action used to store a Value to an AddRequest
- *
+ * <pre>
+ * AttributeList ::= SEQUENCE OF SEQUENCE {
+ * ...
+ * vals SET OF AttributeValue }
+ *
+ * AttributeValue OCTET STRING
+ * </pre>
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ValueAction extends GrammarAction<LdapMessageContainer<AddRequestDecorator>>
+public class AddAttributeValue extends GrammarAction<LdapMessageContainer<AddRequestDecorator>>
{
/** The logger */
- private static final Logger LOG = LoggerFactory.getLogger( ValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( AddAttributeValue.class );
/** Speedup for logs */
private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -46,7 +52,7 @@ public class ValueAction extends Grammar
/**
* Instantiates a new value action.
*/
- public ValueAction()
+ public AddAttributeValue()
{
super( "Store a value" );
}
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlValueAction.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlValueAction.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlValueAction.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ControlValueAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlValueAction.java Wed Feb 9 23:28:20 2011
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.controls;
import org.apache.directory.shared.asn1.DecoderException;
Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/InitExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/InitExtendedRequest.java?rev=1069168&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/InitExtendedRequest.java (added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/InitExtendedRequest.java Wed Feb 9 23:28:20 2011
@@ -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.shared.ldap.codec.actions.extendedRequest;
+
+
+import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.ExtendedRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.ExtendedRequestImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the ExtendedRequest message
+ * <pre>
+ * LdapMessage ::= ... ExtendedRequest ...
+ * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitExtendedRequest extends GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( InitExtendedRequest.class );
+
+ /**
+ * Instantiates a new action.
+ */
+ public InitExtendedRequest()
+ {
+ super( "Init ExtendedRequest" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
+ {
+ // Now, we can allocate the ExtendedRequest Object
+ ExtendedRequestDecorator extendedRequest = new ExtendedRequestDecorator(
+ container.getLdapCodecService(), new ExtendedRequestImpl( container.getMessageId() ) );
+ container.setMessage( extendedRequest );
+
+ LOG.debug( "Extended request" );
+ }
+}
Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java?rev=1069168&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java (added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestName.java Wed Feb 9 23:28:20 2011
@@ -0,0 +1,124 @@
+/*
+ * 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.shared.ldap.codec.actions.extendedRequest;
+
+
+import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.util.OID;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.ExtendedRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
+import org.apache.directory.shared.util.Strings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the Extended Request name
+ * <pre>
+ * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+ * requestName [0] LDAPOID,
+ * ...
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreExtendedRequestName extends GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedRequestName.class );
+
+ /** Speedup for logs */
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+ /**
+ * Instantiates a new action.
+ */
+ public StoreExtendedRequestName()
+ {
+ super( "Store ExtendedRequest Name" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
+ {
+ // We can allocate the ExtendedRequest Object
+ ExtendedRequest extendedRequest = container.getMessage();
+
+ // Get the Value and store it in the ExtendedRequest
+ TLV tlv = container.getCurrentTLV();
+
+ // We have to handle the special case of a 0 length matched
+ // OID
+ if ( tlv.getLength() == 0 )
+ {
+ String msg = I18n.err( I18n.ERR_04095 );
+ LOG.error( msg );
+ // This will generate a PROTOCOL_ERROR
+ throw new DecoderException( msg );
+ }
+ else
+ {
+ byte[] requestNameBytes = tlv.getValue().getData();
+
+ try
+ {
+ String requestName = Strings.utf8ToString(requestNameBytes);
+
+ if ( !OID.isOID( requestName ) )
+ {
+
+ String msg = "The Request name is not a valid OID : "
+ + Strings.utf8ToString(requestNameBytes) + " ("
+ + Strings.dumpBytes(requestNameBytes) + ") is invalid";
+ LOG.error( msg );
+
+ // throw an exception, we will get a PROTOCOL_ERROR
+ throw new DecoderException( msg );
+ }
+
+ extendedRequest.setRequestName( requestName );
+ }
+ catch ( DecoderException de )
+ {
+ String msg = "The Request name is not a valid OID : "
+ + Strings.utf8ToString(requestNameBytes) + " ("
+ + Strings.dumpBytes(requestNameBytes) + ") is invalid";
+ LOG.error( "{} : {}", msg, de.getMessage() );
+
+ // Rethrow the exception, we will get a PROTOCOL_ERROR
+ throw de;
+ }
+ }
+
+ // We can have an END transition
+ container.setGrammarEndAllowed( true );
+
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "OID read : {}", extendedRequest.getRequestName() );
+ }
+ }
+}
Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java?rev=1069168&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java (added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedRequest/StoreExtendedRequestValue.java Wed Feb 9 23:28:20 2011
@@ -0,0 +1,90 @@
+/*
+ * 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.shared.ldap.codec.actions.extendedRequest;
+
+
+import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.ExtendedRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
+import org.apache.directory.shared.util.StringConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the Extended Request value
+ * <pre>
+ * ExtendedRequest ::= [APPLICATION 23] SEQUENCE {
+ * ...
+ * requestValue [1] OCTET STRING OPTIONAL }
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreExtendedRequestValue extends GrammarAction<LdapMessageContainer<ExtendedRequestDecorator>>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( StoreExtendedRequestValue.class );
+
+ /** Speedup for logs */
+ private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+ /**
+ * Instantiates a new action.
+ */
+ public StoreExtendedRequestValue()
+ {
+ super( "Store ExtendedRequest value" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( LdapMessageContainer<ExtendedRequestDecorator> container ) throws DecoderException
+ {
+ // We can allocate the ExtendedRequest Object
+ ExtendedRequest extendedRequest = container.getMessage();
+
+ // Get the Value and store it in the ExtendedRequest
+ TLV tlv = container.getCurrentTLV();
+
+ // We have to handle the special case of a 0 length matched
+ // value
+ if ( tlv.getLength() == 0 )
+ {
+ extendedRequest.setRequestValue( StringConstants.EMPTY_BYTES );
+ }
+ else
+ {
+ extendedRequest.setRequestValue( tlv.getValue().getData() );
+ }
+
+ // We can have an END transition
+ container.setGrammarEndAllowed( true );
+
+ if ( IS_DEBUG )
+ {
+ LOG.debug( "Extended value : {}", extendedRequest.getRequestValue() );
+ }
+ }
+}
Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/InitExtendedResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/InitExtendedResponse.java?rev=1069168&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/InitExtendedResponse.java (added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/InitExtendedResponse.java Wed Feb 9 23:28:20 2011
@@ -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.shared.ldap.codec.actions.extendedResponse;
+
+
+import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.ExtendedResponseDecorator;
+import org.apache.directory.shared.ldap.model.message.ExtendedResponseImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the ExtendedResponse message
+ * <pre>
+ * LdapMessage ::= ... ExtendedResponse ...
+ * ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitExtendedResponse extends GrammarAction<LdapMessageContainer<ExtendedResponseDecorator>>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( InitExtendedResponse.class );
+
+ /**
+ * Instantiates a new action.
+ */
+ public InitExtendedResponse()
+ {
+ super( "Init ExtendedResponse" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( LdapMessageContainer<ExtendedResponseDecorator> container ) throws DecoderException
+ {
+ // Now, we can allocate the ExtendedResponse Object
+ ExtendedResponseDecorator extendedResponse = new ExtendedResponseDecorator(
+ container.getLdapCodecService(), new ExtendedResponseImpl( container.getMessageId() ) );
+ container.setMessage( extendedResponse );
+
+ LOG.debug( "Extended Response" );
+ }
+}
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreResponseName.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreResponseName.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreResponseName.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/extendedResponse/StoreResponseName.java Wed Feb 9 23:28:20 2011
@@ -6,18 +6,18 @@
* 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.
- *
+ * under the License.
+ *
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.extendedResponse;
import org.apache.directory.shared.asn1.DecoderException;
@@ -35,13 +35,19 @@ import org.slf4j.LoggerFactory;
/**
* The action used to store a Response Name to an ExtendedResponse
- *
+ * <pre>
+ * LdapMessage ::= ... ExtendedResponse ...
+ * ExtendedResponse ::= [APPLICATION 24] SEQUENCE {
+ * COMPONENTS OF LDAPResult,
+ * responseName [10] LDAPOID OPTIONAL,
+ * ...
+ * </pre>
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ResponseNameAction extends GrammarAction<LdapMessageContainer<ExtendedResponseDecorator>>
+public class StoreResponseName extends GrammarAction<LdapMessageContainer<ExtendedResponseDecorator>>
{
/** The logger */
- private static final Logger LOG = LoggerFactory.getLogger( ResponseNameAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreResponseName.class );
/** Speedup for logs */
private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -50,7 +56,7 @@ public class ResponseNameAction extends
/**
* Instantiates a new response name action.
*/
- public ResponseNameAction()
+ public StoreResponseName()
{
super( "Store response name" );
}
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/StoreModifyRequestAttributeValue.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/StoreModifyRequestAttributeValue.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/StoreModifyRequestAttributeValue.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ModifyAttributeValueAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/modifyRequest/StoreModifyRequestAttributeValue.java Wed Feb 9 23:28:20 2011
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.modifyRequest;
import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
@@ -35,10 +35,10 @@ import org.slf4j.LoggerFactory;
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ModifyAttributeValueAction extends GrammarAction<LdapMessageContainer<ModifyRequestDecorator>>
+public class StoreModifyRequestAttributeValue extends GrammarAction<LdapMessageContainer<ModifyRequestDecorator>>
{
/** The logger */
- private static final Logger LOG = LoggerFactory.getLogger( ModifyAttributeValueAction.class );
+ private static final Logger LOG = LoggerFactory.getLogger( StoreModifyRequestAttributeValue.class );
/** Speedup for logs */
private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -47,7 +47,7 @@ public class ModifyAttributeValueAction
/**
* Instantiates a new modify attribute value action.
*/
- public ModifyAttributeValueAction()
+ public StoreModifyRequestAttributeValue()
{
super( "Stores AttributeValue" );
}
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultEntry/SearchResultAttributeValueAction.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultEntry/SearchResultAttributeValueAction.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultEntry/SearchResultAttributeValueAction.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/SearchResultAttributeValueAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultEntry/SearchResultAttributeValueAction.java Wed Feb 9 23:28:20 2011
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.searchResultEntry;
import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/InitSearchResultReference.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/InitSearchResultReference.java?rev=1069168&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/InitSearchResultReference.java (added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/InitSearchResultReference.java Wed Feb 9 23:28:20 2011
@@ -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.shared.ldap.codec.actions.searchResultReference;
+
+
+import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.decorators.SearchResultReferenceDecorator;
+import org.apache.directory.shared.ldap.model.message.SearchResultReferenceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the SearchResultReference response
+ * <pre>
+ * LdapMessage ::= ... SearchResultReference ...
+ * SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitSearchResultReference extends GrammarAction<LdapMessageContainer<SearchResultReferenceDecorator>>
+{
+ /** The logger */
+ private static final Logger LOG = LoggerFactory.getLogger( InitSearchResultReference.class );
+
+ /**
+ * Instantiates a new action.
+ */
+ public InitSearchResultReference()
+ {
+ super( "Init SearchResultReference" );
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void action( LdapMessageContainer<SearchResultReferenceDecorator> container ) throws DecoderException
+ {
+ // Now, we can allocate the SearchResultReference Object
+ SearchResultReferenceDecorator searchResultReference = new SearchResultReferenceDecorator(
+ container.getLdapCodecService(), new SearchResultReferenceImpl( container.getMessageId() ) );
+ container.setMessage( searchResultReference );
+
+ LOG.debug( "SearchResultReference response " );
+ }
+}
Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/StoreReferenceAction.java (from r1069154, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/StoreReferenceAction.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/StoreReferenceAction.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java&r1=1069154&r2=1069168&rev=1069168&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java (original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/searchResultReference/StoreReferenceAction.java Wed Feb 9 23:28:20 2011
@@ -17,7 +17,7 @@
* under the License.
*
*/
-package org.apache.directory.shared.ldap.codec.actions;
+package org.apache.directory.shared.ldap.codec.actions.searchResultReference;
import org.apache.directory.shared.asn1.DecoderException;