directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1068531 [3/3] - in /directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec: ./ actions/ actions/bindRequest/ actions/bindResponse/ actions/controls/ actions/ldapResult/
Date Tue, 08 Feb 2011 19:16:10 GMT
Modified: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java?rev=1068531&r1=1068530&r2=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/InitBindRequest.java
Tue Feb  8 19:16:09 2011
@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * The action used to initialize the AbandonRequest
+ * The action used to initialize the BindRequest
  * <pre>
  * LdapMessage ::= ... BindRequest ...
  * BindRequest ::= [APPLICATION 0] SEQUENCE { ...

Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslCredentials.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslCredentials.java?rev=1068531&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslCredentials.java
(added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslCredentials.java
Tue Feb  8 19:16:09 2011
@@ -0,0 +1,92 @@
+/*
+ *  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.bindRequest;
+
+
+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.BindRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.BindRequest;
+import org.apache.directory.shared.util.StringConstants;
+import org.apache.directory.shared.util.Strings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the BindRequest version MessageID.
+ * <pre>
+ * SaslCredentials ::= SEQUENCE {
+ *     mechanism   LDAPSTRING,
+ *     ...
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSaslCredentials extends GrammarAction<LdapMessageContainer<BindRequestDecorator>>
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( StoreSaslCredentials.class
);
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new action.
+     */
+    public StoreSaslCredentials()
+    {
+        super( "Store SASL mechanism" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( LdapMessageContainer<BindRequestDecorator> container ) throws
DecoderException
+    {
+        BindRequest bindRequestMessage = container.getMessage();
+
+        // Get the Value and store it in the BindRequest
+        TLV tlv = container.getCurrentTLV();
+
+        // We have to handle the special case of a 0 length
+        // credentials
+        if ( tlv.getLength() == 0 )
+        {
+            bindRequestMessage.setCredentials( StringConstants.EMPTY_BYTES );
+        }
+        else
+        {
+            bindRequestMessage.setCredentials( tlv.getValue().getData() );
+        }
+
+        // We can have an END transition
+        container.setGrammarEndAllowed( true );
+
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "The credentials are : {}", Strings.dumpBytes(bindRequestMessage
+                    .getCredentials()) );
+        }
+    }
+}

Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslMechanism.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslMechanism.java?rev=1068531&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslMechanism.java
(added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindRequest/StoreSaslMechanism.java
Tue Feb  8 19:16:09 2011
@@ -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.shared.ldap.codec.actions.bindRequest;
+
+
+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.BindRequestDecorator;
+import org.apache.directory.shared.ldap.model.message.BindRequest;
+import org.apache.directory.shared.util.Strings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to store the BindRequest version MessageID.
+ * <pre>
+ * SaslCredentials ::= SEQUENCE {
+ *     ...
+ *     credentials OCTET STRING OPTIONAL }
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSaslMechanism extends GrammarAction<LdapMessageContainer<BindRequestDecorator>>
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( StoreSaslMechanism.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new action.
+     */
+    public StoreSaslMechanism()
+    {
+        super( "Store SASL credentials" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( LdapMessageContainer<BindRequestDecorator> container )
+    {
+        BindRequest bindRequestMessage = container.getMessage();
+        TLV tlv = container.getCurrentTLV();
+
+        // We have to handle the special case of a 0 length
+        // mechanism
+        if ( tlv.getLength() == 0 )
+        {
+            bindRequestMessage.setSaslMechanism( "" );
+        }
+        else
+        {
+            bindRequestMessage.setSaslMechanism( Strings.utf8ToString(tlv.getValue().getData())
);
+        }
+
+        // We can have an END transition
+        container.setGrammarEndAllowed( true );
+
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "The mechanism is : {}", bindRequestMessage.getSaslMechanism() );
+        }
+    }
+}

Added: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/InitBindResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/InitBindResponse.java?rev=1068531&view=auto
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/InitBindResponse.java
(added)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/InitBindResponse.java
Tue Feb  8 19:16:09 2011
@@ -0,0 +1,58 @@
+/*
+ *  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.bindResponse;
+
+
+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.BindResponseDecorator;
+import org.apache.directory.shared.ldap.model.message.BindResponseImpl;
+
+
+/**
+ * The action used to initialize the BindResponse
+ * <pre>
+ * LdapMessage ::= ... BindResponse ...
+ * BindResponse ::= [APPLICATION 1] SEQUENCE { ...
+ * </pre>
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InitBindResponse extends GrammarAction<LdapMessageContainer<BindResponseDecorator>>
+{
+    /**
+     * Instantiates a new action.
+     */
+    public InitBindResponse()
+    {
+        super( "Init BindResponse" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( LdapMessageContainer<BindResponseDecorator> container )
+    {
+        // Now, we can allocate the BindResponse Object
+        BindResponseDecorator bindResponse = new BindResponseDecorator(
+            container.getLdapCodecService(), new BindResponseImpl( container.getMessageId()
) );
+        container.setMessage( bindResponse );
+    }
+}

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/StoreServerSASLCreds.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/StoreServerSASLCreds.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/StoreServerSASLCreds.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ServerSASLCredsAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/bindResponse/StoreServerSASLCreds.java
Tue Feb  8 19:16:09 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.bindResponse;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
@@ -33,14 +33,18 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * The action used to store a SASL credentials
- * 
+ * The action used to store a SASL credentials :
+ * <pre>
+ * BindResponse ::= APPLICATION 1] SEQUENCE {
+ *     ...
+ *     serverSaslCreds [7] OCTET STRING OPTIONAL }
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ServerSASLCredsAction extends GrammarAction<LdapMessageContainer<BindResponseDecorator>>
+public class StoreServerSASLCreds extends GrammarAction<LdapMessageContainer<BindResponseDecorator>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ServerSASLCredsAction.class
);
+    private static final Logger LOG = LoggerFactory.getLogger( StoreServerSASLCreds.class
);
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -49,7 +53,7 @@ public class ServerSASLCredsAction exten
     /**
      * Instantiates a new server sasl creds action.
      */
-    public ServerSASLCredsAction()
+    public StoreServerSASLCreds()
     {
         super( "Store server sasl credentials value" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/InitControls.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlsInitAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/InitControls.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/InitControls.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlsInitAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/ControlsInitAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/controls/InitControls.java
Tue Feb  8 19:16:09 2011
@@ -38,10 +38,10 @@ import org.slf4j.LoggerFactory;
  * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ControlsInitAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class InitControls extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ControlsInitAction.class );
+    private static final Logger LOG = LoggerFactory.getLogger( InitControls.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -50,7 +50,7 @@ public class ControlsInitAction extends 
     /**
      * Instantiates a new controls init action.
      */
-    public ControlsInitAction()
+    public InitControls()
     {
         super( "Initialize a control" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/AddReferral.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/AddReferral.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/AddReferral.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/AddReferral.java
Tue Feb  8 19:16:09 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.ldapResult;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
@@ -27,8 +27,12 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
-import org.apache.directory.shared.ldap.model.message.*;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
+import org.apache.directory.shared.ldap.model.message.LdapResult;
+import org.apache.directory.shared.ldap.model.message.Message;
+import org.apache.directory.shared.ldap.model.message.Referral;
+import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -36,13 +40,16 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to add a referral to a LdapTresult
- * 
+ * <pre>
+ * Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI (RFC 4511)
+ * URI ::= LDAPString
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ReferralAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class AddReferral extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ReferralAction.class );
+    private static final Logger LOG = LoggerFactory.getLogger( AddReferral.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -51,7 +58,7 @@ public class ReferralAction extends Gram
     /**
      * Instantiates a new referral action.
      */
-    public ReferralAction()
+    public AddReferral()
     {
         super( "Add a referral" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/InitReferrals.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/InitReferrals.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/InitReferrals.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/InitReferrals.java
Tue Feb  8 19:16:09 2011
@@ -6,23 +6,23 @@
  *  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.ldapResult;
 
 
+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.DecoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
@@ -36,14 +36,18 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * The action used to init referrals to a LdapTresult
- * 
+ * The action used to init referrals to a LdapResult :
+ * <pre>
+ * LDAPResult ::= SEQUENCE {
+ *     ...
+ *     referral   [3] Referral OPTIONNAL }
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class InitReferralsAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class InitReferrals extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( InitReferralsAction.class
);
+    private static final Logger LOG = LoggerFactory.getLogger( InitReferrals.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -52,7 +56,7 @@ public class InitReferralsAction extends
     /**
      * Instantiates a new init referrals action.
      */
-    public InitReferralsAction()
+    public InitReferrals()
     {
         super( "Init the referrals list" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreErrorMessage.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreErrorMessage.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreErrorMessage.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ErrorMessageAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreErrorMessage.java
Tue Feb  8 19:16:09 2011
@@ -6,23 +6,23 @@
  *  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.ldapResult;
 
 
+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.DecoderException;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
@@ -35,13 +35,19 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to set the LdapResult error message.
- * 
+ *
+ * <pre>
+ *  LDAPResult ::= SEQUENCE {
+ *     ...
+ *     errorMessage LDAPString,
+ *     ...
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ErrorMessageAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class StoreErrorMessage extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ErrorMessageAction.class );
+    private static final Logger LOG = LoggerFactory.getLogger( StoreErrorMessage.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -50,7 +56,7 @@ public class ErrorMessageAction extends 
     /**
      * Instantiates a new error message action.
      */
-    public ErrorMessageAction()
+    public StoreErrorMessage()
     {
         super( "Store error message" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreMatchedDN.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreMatchedDN.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreMatchedDN.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreMatchedDN.java
Tue Feb  8 19:16:09 2011
@@ -6,23 +6,23 @@
  *  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.ldapResult;
 
 
+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.DecoderException;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
@@ -39,13 +39,19 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to set the LdapResult matched Dn.
- * 
+ *
+ * <pre>
+ * LDAPResult ::= SEQUENCE {
+ *     ...
+ *     matchedDN LDAPDN,
+ *     ...
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MatchedDNAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class StoreMatchedDN extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( MatchedDNAction.class );
+    private static final Logger LOG = LoggerFactory.getLogger( StoreMatchedDN.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -54,7 +60,7 @@ public class MatchedDNAction extends Gra
     /**
      * Instantiates a new matched dn action.
      */
-    public MatchedDNAction()
+    public StoreMatchedDN()
     {
         super( "Store matched Dn" );
     }

Copied: directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreResultCode.java
(from r1068496, directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreResultCode.java?p2=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreResultCode.java&p1=directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java&r1=1068496&r2=1068531&rev=1068531&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
(original)
+++ directory/shared/branches/m1/ldap-codec/src/main/java/org/apache/directory/shared/ldap/codec/actions/ldapResult/StoreResultCode.java
Tue Feb  8 19:16:09 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.ldapResult;
 
 
 import org.apache.directory.shared.asn1.DecoderException;
@@ -40,13 +40,17 @@ import org.slf4j.LoggerFactory;
 
 /**
  * The action used to set the LdapResult result code.
- * 
+ * <pre>
+ * LDAPResult ::= SEQUENCE {
+ *     resultCode ENUMERATED {
+ *         ...
+ * </pre>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ResultCodeAction extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
+public class StoreResultCode extends GrammarAction<LdapMessageContainer<MessageDecorator<?
extends Message>>>
 {
     /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ResultCodeAction.class );
+    private static final Logger LOG = LoggerFactory.getLogger( StoreResultCode.class );
 
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
@@ -55,7 +59,7 @@ public class ResultCodeAction extends Gr
     /**
      * Instantiates a new result code action.
      */
-    public ResultCodeAction()
+    public StoreResultCode()
     {
         super( "Store resultCode" );
     }



Mime
View raw message