directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r491023 [1/2] - in /directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main: java/org/apache/directory/ldapstudio/dsmlv2/ java/org/apache/directory/ldapstudio/dsmlv2/engine/ java/org/apache/directory/ldapstudio/dsmlv2/reponse/ resources...
Date Fri, 29 Dec 2006 14:59:48 GMT
Author: pamarcelot
Date: Fri Dec 29 06:59:46 2006
New Revision: 491023

URL: http://svn.apache.org/viewvc?view=rev&rev=491023
Log:
Code & Javadoc cleaning.

Modified:
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/AbstractGrammar.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchRequest.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchResponse.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Container.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Container.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseGrammar.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseParser.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2StatesEnum.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarAction.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarTransition.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IAction.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IGrammar.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IStates.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/ParserUtils.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Tag.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AddResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AuthResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/CompareResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DelResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DsmlDecorator.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ErrorResponse.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ExtendedResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/LdapMessageDecorator.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/LdapResponseDecorator.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/LdapResultDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/LdapResultEnum.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ModDNResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ModifyResponseDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/SearchResponse.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/SearchResultDoneDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/SearchResultEntryDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/SearchResultReferenceDsml.java
    directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/resources/org/apache/directory/ldapstudio/dsmlv2/engine/DSMLv2.xslt

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/AbstractGrammar.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/AbstractGrammar.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/AbstractGrammar.java Fri Dec 29 06:59:46 2006
@@ -21,6 +21,7 @@
 package org.apache.directory.ldapstudio.dsmlv2;
 
 
+import java.io.IOException;
 import java.util.HashMap;
 
 import org.xmlpull.v1.XmlPullParser;
@@ -30,6 +31,9 @@
 /**
  * The abstract IGrammar which is the Mother of all the grammars. It contains
  * the transitions table.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public abstract class AbstractGrammar implements IGrammar
 {
@@ -48,15 +52,6 @@
     protected IStates statesEnum;
 
 
-    public AbstractGrammar()
-    {
-
-    }
-
-
-    // ~ Methods
-    // ------------------------------------------------------------------------------------
-
     /**
      * Return the grammar's name
      * 
@@ -72,7 +67,7 @@
      * Set the grammar's name
      * 
      * @param name
-     *            DOCUMENT ME!
+     *      the name to set
      */
     public void setName( String name )
     {
@@ -98,7 +93,8 @@
     /**
      * Get the states of the current grammar
      * 
-     * @return Returns the statesEnum.
+     * @return 
+     *      Returns the statesEnum.
      */
     public IStates getStatesEnum()
     {
@@ -110,7 +106,7 @@
      * Set the states for this grammar
      * 
      * @param statesEnum
-     *            The statesEnum to set.
+     *      The statesEnum to set.
      */
     public void setStatesEnum( IStates statesEnum )
     {
@@ -118,7 +114,10 @@
     }
 
 
-    public void executeAction( Dsmlv2Container container ) throws Exception
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.IGrammar#executeAction(org.apache.directory.ldapstudio.dsmlv2.Dsmlv2Container)
+     */
+    public void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException
     {
         XmlPullParser xpp = container.getParser();
 
@@ -147,7 +146,17 @@
     }
 
 
-    private void processTag( Dsmlv2Container container, int tagType ) throws Exception
+    /**
+     * Processes the task required in the grammar to the given tag type
+     *
+     * @param container
+     *      the DSML container
+     * @param tagType
+     *      the tag type
+     * @throws XmlPullParserException 
+     *      when an error occurs during the parsing
+     */
+    private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
     {
         XmlPullParser xpp = container.getParser();
 

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchRequest.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchRequest.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchRequest.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchRequest.java Fri Dec 29 06:59:46 2006
@@ -27,106 +27,219 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 
 
+/**
+ * This class represents the Batch Request of a DSML Request
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BatchRequest
 {
+    /**
+     * The requests contained in the Batch Request
+     */
     private List<LdapMessage> requests;
 
+    /**
+     * The ID of the request
+     */
     private int requestID;
 
+    /**
+     * This enum represents the different types of processing for a Batch Request 
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     public enum Processing
     {
         SEQUENTIAL, PARALLEL
     };
 
+    /**
+     * The type of processing of the Batch Request
+     */
     private Processing processing;
 
+    /**
+     * This enum represents the different types of on error handling for a BatchRequest
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     public enum OnError
     {
         RESUME, EXIT
     };
 
+    /**
+     * The type of on error handling
+     */
     private OnError onError;
 
+    /**
+     * This enum represents the different types of response order for a Batch Request
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     public enum ResponseOrder
     {
         SEQUENTIAL, UNORDERED
     };
 
+    /**
+     * The response order
+     */
     private ResponseOrder responseOrder;
 
 
+    /**
+     * Creates a new instance of BatchRequest.
+     */
     public BatchRequest()
     {
         requests = new ArrayList<LdapMessage>();
     }
 
 
+    /**
+     * Adds a request
+     *
+     * @param request
+     *      the resquest to add
+     * @return
+     *      true (as per the general contract of the Collection.add method)
+     */
     public boolean addRequest( LdapMessage request )
     {
         return requests.add( request );
     }
 
 
+    /**
+     * Gets the current request
+     *
+     * @return
+     *      the current request
+     */
     public LdapMessage getCurrentRequest()
     {
         return requests.get( requests.size() - 1 );
     }
 
 
+    /**
+     * Gets the ID of the request
+     *
+     * @return
+     *      the ID of the request
+     */
     public int getRequestID()
     {
         return requestID;
     }
 
 
+    /**
+     * Sets the ID of the request
+     *
+     * @param requestID
+     *      the ID to set
+     */
     public void setRequestID( int requestID )
     {
         this.requestID = requestID;
     }
 
 
+    /**
+     * Gets the processing type of the request
+     *
+     * @return
+     *      the processing type of the request
+     */
     public Processing getProcessing()
     {
         return processing;
     }
 
 
+    /**
+     * Sets the processing type of the request
+     *
+     * @param processing
+     *      the processing type to set
+     */
     public void setProcessing( Processing processing )
     {
         this.processing = processing;
     }
 
 
+    /**
+     * Gets the on error handling type of the request
+     *
+     * @return
+     *      the on error handling type of the request
+     */
     public OnError getOnError()
     {
         return onError;
     }
 
 
+    /**
+     * Sets the on error handling type of the request
+     *
+     * @param onError
+     *      the on error handling type to set
+     */
     public void setOnError( OnError onError )
     {
         this.onError = onError;
     }
 
 
+    /**
+     * Gets the reponse order type of the request
+     *
+     * @return
+     *      the reponse order type of the request
+     */
     public ResponseOrder getResponseOrder()
     {
         return responseOrder;
     }
 
 
+    /**
+     * Sets the reponse order type of the request
+     *
+     * @param responseOrder
+     *      the reponse order type to set
+     */
     public void setResponseOrder( ResponseOrder responseOrder )
     {
         this.responseOrder = responseOrder;
     }
 
 
+    /**
+     * Gets the List of all the requests in the Batch Request
+     *
+     * @return
+     *      the List of all the requests in the Batch Request
+     */
     public List getRequests()
     {
         return requests;
     }
 
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
     @Override
     public String toString()
     {
@@ -142,5 +255,4 @@
 
         return sb.toString();
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchResponse.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchResponse.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchResponse.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/BatchResponse.java Fri Dec 29 06:59:46 2006
@@ -27,44 +27,90 @@
 import org.apache.directory.shared.ldap.codec.LdapResponse;
 
 
+/**
+ * This class represents the Batch Response of a DSML Response
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class BatchResponse
 {
 
+    /**
+     * The responses contained in the Batch Response
+     */
     private List<LdapResponse> responses;
 
+    /**
+     * The ID of the response
+     */
     private int requestID;
 
 
+    /**
+     * Creates a new instance of BatchResponse.
+     */
     public BatchResponse()
     {
         responses = new ArrayList<LdapResponse>();
     }
 
 
+    /**
+     * Adds a reponse
+     *
+     * @param response
+     *      the response to add
+     * @return
+     *      true (as per the general contract of the Collection.add method)
+     */
     public boolean addResponse( LdapResponse response )
     {
         return responses.add( response );
     }
 
 
+    /**
+     * Gets the current reponse
+     *
+     * @return
+     *      the current response
+     */
     public LdapResponse getCurrentResponse()
     {
         return responses.get( responses.size() - 1 );
     }
 
 
+    /**
+     * Gets the ID of the response
+     * @return
+     *      the ID of the response
+     */
     public int getRequestID()
     {
         return requestID;
     }
 
 
+    /**
+     * Sets the ID of the response
+     *
+     * @param requestID
+     *      the ID to set
+     */
     public void setRequestID( int requestID )
     {
         this.requestID = requestID;
     }
 
 
+    /**
+     * Gets the List of all the reponses
+     *
+     * @return
+     *      the List of all the responses
+     */
     public List getResponses()
     {
         return responses;

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Container.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Container.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Container.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Container.java Fri Dec 29 06:59:46 2006
@@ -21,12 +21,14 @@
 package org.apache.directory.ldapstudio.dsmlv2;
 
 
+/**
+ * This interface represents a container that can be used by the parser to store parsed information
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public interface Container
 {
-    // ~ Methods
-    // ------------------------------------------------------------------------------------
-
-    // State accessors
     /**
      * Get the current grammar state
      * 

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Container.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Container.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Container.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Container.java Fri Dec 29 06:59:46 2006
@@ -24,6 +24,13 @@
 import org.xmlpull.v1.XmlPullParser;
 
 
+/**
+ * This class represents the DSML Container.
+ * It used by the DSML Parser to store information.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Dsmlv2Container implements Container
 {
     /** The current state of the decoding */
@@ -44,19 +51,15 @@
     /** The BatchResponse of the parsing */
     private BatchResponse batchResponse;
 
+    /**  The associated grammar */
     private AbstractGrammar grammar;
 
 
-    public Dsmlv2Container()
-    {
-        //grammar = Dsmlv2Grammar.getInstance();
-    }
-
-
     /**
-     * Get the DSML Batch Request
+     * Gets the DSML Batch Request
      * 
-     * @return Returns the Batch Request
+     * @return
+     *      Returns the Batch Request
      */
     public BatchRequest getBatchRequest()
     {
@@ -66,7 +69,9 @@
 
     /**
      * Sets the DSML Batch Request
+     * 
      * @param batchRequest
+     *      the Batch Request to set
      */
     public void setBatchRequest( BatchRequest batchRequest )
     {
@@ -75,9 +80,10 @@
 
 
     /**
-     * Get the DSML Batch Response
+     * Gets the DSML Batch Response
      * 
-     * @return Returns the Batch Response
+     * @return
+     *      Returns the Batch Response
      */
     public BatchResponse getBatchResponse()
     {
@@ -87,7 +93,9 @@
 
     /**
      * Sets the DSML Batch Request
+     * 
      * @param batchRequest
+     *      the Batch Response to set
      */
     public void setBatchResponse( BatchResponse batchResponse )
     {
@@ -96,9 +104,10 @@
 
 
     /**
-     * Get the parser
+     * Gets the parser
      * 
-     * @return Returns the parser
+     * @return
+     *      the parser
      */
     public XmlPullParser getParser()
     {
@@ -107,10 +116,10 @@
 
 
     /**
-     * Set the parser
+     * Sets the parser
      * 
-     * @param state
-     *            The parser
+     * @param parser
+     *      the parser to set
      */
     public void setParser( XmlPullParser parser )
     {
@@ -121,7 +130,8 @@
     /**
      * Get the current grammar state
      * 
-     * @return Returns the current grammar state
+     * @return
+     *      the current grammar state
      */
     public int getState()
     {
@@ -133,7 +143,7 @@
      * Set the new current state
      * 
      * @param state
-     *            The new state
+     *      the new state
      */
     public void setState( int state )
     {
@@ -144,7 +154,8 @@
     /**
      * Get the transition
      * 
-     * @return Returns the transition from the previous state to the new state
+     * @return
+     *      the transition from the previous state to the new state
      */
     public int getTransition()
     {
@@ -156,7 +167,7 @@
      * Update the transition from a state to another
      * 
      * @param transition
-     *            The transition to set
+     *      the transition to set
      */
     public void setTransition( int transition )
     {
@@ -167,7 +178,8 @@
     /**
      * Get the states for this container's grammars
      * 
-     * @return Returns the states.
+     * @return
+     *      the states.
      */
     public IStates getStates()
     {
@@ -175,12 +187,24 @@
     }
 
 
+    /**
+     * Gets the grammar
+     *
+     * @return
+     *      the grammar
+     */
     public AbstractGrammar getGrammar()
     {
         return grammar;
     }
 
 
+    /**
+     * Sets the Grammar
+     * 
+     * @param grammar
+     *      the grammar to set
+     */
     public void setGrammar( AbstractGrammar grammar )
     {
         this.grammar = grammar;
@@ -191,10 +215,11 @@
      * Get the transition associated with the state and tag
      * 
      * @param state
-     *            The current state
+     *      the current state
      * @param tag
-     *            The current tag
-     * @return A valid transition if any, or null.
+     *      the current tag
+     * @return
+     *      a valid transition if any, or null.
      */
     public GrammarTransition getTransition( int state, Tag tag )
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Grammar.java Fri Dec 29 06:59:46 2006
@@ -64,6 +64,9 @@
 
 /**
  * This Class represents the DSMLv2 Request Grammar
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class Dsmlv2Grammar extends AbstractGrammar implements IGrammar
 {
@@ -71,6 +74,9 @@
     private static Dsmlv2Grammar instance = new Dsmlv2Grammar();
 
 
+    /**
+     * Creates a new instance of Dsmlv2Grammar.
+     */
     @SuppressWarnings("unchecked")
     private Dsmlv2Grammar()
     {
@@ -1123,7 +1129,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	abandonRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                abandonRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // abandonID
             attributeValue = xpp.getAttributeValue( "", "abandonID" );
@@ -1164,7 +1170,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-                    addRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                addRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1226,7 +1232,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -1271,7 +1277,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	authRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                authRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // principal
             attributeValue = xpp.getAttributeValue( "", "principal" );
@@ -1311,7 +1317,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	compareRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                compareRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1374,7 +1380,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -1415,7 +1421,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	delRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                delRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1455,7 +1461,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	extendedRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                extendedRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
         }
     };
@@ -1507,7 +1513,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -1547,7 +1553,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	modifyDNRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                modifyDNRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1640,7 +1646,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	modifyRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                modifyRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1729,11 +1735,11 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 // We are testing if nextText equals "" since a modification can be "".
-                
+
                 if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
                 {
                     modifyRequest.addAttributeValue( Base64.decode( nextText.trim().toCharArray() ) );
@@ -1768,7 +1774,7 @@
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-            	searchRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
+                searchRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue, xpp ) );
             }
             // dn
             attributeValue = xpp.getAttributeValue( "", "dn" );
@@ -1983,14 +1989,15 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
                 {
                     if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
                     {
-                        substringFilter.setInitialSubstrings( new String( Base64.decode( nextText.trim().toCharArray() ) ) );
+                        substringFilter
+                            .setInitialSubstrings( new String( Base64.decode( nextText.trim().toCharArray() ) ) );
                     }
                     else
                     {
@@ -2020,7 +2027,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -2057,14 +2064,15 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
                 {
                     if ( ParserUtils.isBase64BinaryValue( xpp, typeValue ) )
                     {
-                        substringFilter.setFinalSubstrings( new String( Base64.decode( nextText.trim().toCharArray() ) ) );
+                        substringFilter
+                            .setFinalSubstrings( new String( Base64.decode( nextText.trim().toCharArray() ) ) );
                     }
                     else
                     {
@@ -2399,7 +2407,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -2534,7 +2542,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -2576,7 +2584,8 @@
             {
                 if ( !OID.isOID( attributeValue ) )
                 {
-                    throw new XmlPullParserException( "Incorrect value for 'type' attribute. This is not an OID.", xpp, null );
+                    throw new XmlPullParserException( "Incorrect value for 'type' attribute. This is not an OID.", xpp,
+                        null );
                 }
                 control.setControlType( attributeValue );
             }
@@ -2618,7 +2627,7 @@
             {
                 // We have to catch the type Attribute Value before going to the next Text node
                 String typeValue = ParserUtils.getXsiTypeAttributeValue( xpp );
-                
+
                 // Getting the value
                 String nextText = xpp.nextText();
                 if ( !nextText.equals( "" ) )
@@ -2642,9 +2651,10 @@
 
 
     /**
-     * Get the instance of this grammar
+     * Gets an instance of this grammar
      * 
-     * @return An instance on the Dsmlv2Grammar
+     * @return
+     *      an instance of this grammar
      */
     public static Dsmlv2Grammar getInstance()
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2Parser.java Fri Dec 29 06:59:46 2006
@@ -34,11 +34,25 @@
 import org.xmlpull.v1.XmlPullParserFactory;
 
 
+/**
+ * This class represents the DSMLv2 Parser.
+ * It can be used to parse a DSMLv2 Request input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Dsmlv2Parser
 {
+    /** The associated DSMLv2 container */
     private Dsmlv2Container container;
 
 
+    /**
+     * Creates a new instance of Dsmlv2Parser.
+     *
+     * @throws XmlPullParserException
+     *      if an error occurs while the initialization of the parser
+     */
     public Dsmlv2Parser() throws XmlPullParserException
     {
         this.container = new Dsmlv2Container();
@@ -46,13 +60,23 @@
         this.container.setGrammar( Dsmlv2Grammar.getInstance() );
 
         XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware(true);
+        factory.setNamespaceAware( true );
         XmlPullParser xpp = factory.newPullParser();
 
         container.setParser( xpp );
     }
 
 
+    /**
+     * Sets the input file the parser is going to parse
+     *
+     * @param fileName
+     *      the name of the file
+     * @throws FileNotFoundException
+     *      if the file does not exist
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
     {
         Reader reader = new FileReader( fileName );
@@ -60,19 +84,44 @@
     }
 
 
+    /**
+     * Sets the input stream the parser is going to process
+     *
+     * @param inputStream
+     *      contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
+     * @param inputEncoding
+     *      if not null it MUST be used as encoding for inputStream
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
     {
         container.getParser().setInput( inputStream, inputEncoding );
     }
 
 
+    /**
+     * Sets the input string the parser is going to parse
+     *
+     * @param str
+     *      the string the parser is going to parse
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInput( String str ) throws XmlPullParserException
     {
         container.getParser().setInput( new StringReader( str ) );
     }
 
 
-    public void parse() throws Exception
+    /**
+     * Launches the parsing on the input
+     * 
+     * @throws XmlPullParserException 
+     *      when an unrecoverable error occurs
+     * @throws IOException
+     */
+    public void parse() throws XmlPullParserException, IOException
     {
         Dsmlv2Grammar grammar = Dsmlv2Grammar.getInstance();
 
@@ -80,6 +129,12 @@
     }
 
 
+    /**
+     * Launches the parsing of the Batch Request only
+     *
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void parseBatchRequest() throws XmlPullParserException
     {
         XmlPullParser xpp = container.getParser();
@@ -117,6 +172,16 @@
     }
 
 
+    /**
+     * Processes the task required in the grammar to the given tag type
+     *
+     * @param container
+     *      the DSML container
+     * @param tagType
+     *      the tag type
+     * @throws XmlPullParserException 
+     *      when an error occurs during the parsing
+     */
     private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
     {
         XmlPullParser xpp = container.getParser();
@@ -142,6 +207,12 @@
     }
 
 
+    /**
+     * Gets the Batch Request or null if the it has not been parsed yet
+     *
+     * @return 
+     *      the Batch Request or null if the it has not been parsed yet
+     */
     public BatchRequest getBatchRequest()
     {
         return container.getBatchRequest();
@@ -149,10 +220,11 @@
 
 
     /**
-     * Returns the next Request or null if there's no more request
-     * @return the next Request or null if there's no more request
-     * @throws XmlPullParserException 
-     * @throws Exception
+     * Gets the next Request or null if there's no more request
+     * @return
+     *      the next Request or null if there's no more request
+     * @throws XmlPullParserException      
+     *      when an error occurs during the parsing
      */
     public LdapMessage getNextRequest() throws XmlPullParserException
     {
@@ -214,7 +286,13 @@
     }
 
 
-    public void parseAllRequests() throws Exception
+    /**
+     * Parses all the requests
+     *
+     * @throws XmlPullParserException
+     *      when an error occurs during the parsing
+     */
+    public void parseAllRequests() throws XmlPullParserException
     {
         while ( getNextRequest() != null )
         {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseGrammar.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseGrammar.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseGrammar.java Fri Dec 29 06:59:46 2006
@@ -58,6 +58,9 @@
 
 /**
  * This Class represents the DSMLv2 Response Grammar
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class Dsmlv2ResponseGrammar extends AbstractGrammar implements IGrammar
 {
@@ -1792,7 +1795,8 @@
     /**
      * Get the instance of this grammar
      * 
-     * @return An instance on the Dsmlv2ResponseGrammar
+     * @return
+     *      an instance on this grammar
      */
     public static Dsmlv2ResponseGrammar getInstance()
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseParser.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseParser.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseParser.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2ResponseParser.java Fri Dec 29 06:59:46 2006
@@ -34,11 +34,25 @@
 import org.xmlpull.v1.XmlPullParserFactory;
 
 
+/**
+ * This class represents the DSMLv2 Parser.
+ * It can be used to parse a DSMLv2 Response input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Dsmlv2ResponseParser
 {
+    /** The associated DSMLv2 container */
     private Dsmlv2Container container;
 
 
+    /**
+     * Creates a new instance of Dsmlv2ResponseParser.
+     *
+     * @throws XmlPullParserException
+     *      if an error occurs while the initialization of the parser
+     */
     public Dsmlv2ResponseParser() throws XmlPullParserException
     {
         this.container = new Dsmlv2Container();
@@ -46,19 +60,37 @@
         this.container.setGrammar( Dsmlv2ResponseGrammar.getInstance() );
 
         XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware(true);
+        factory.setNamespaceAware( true );
         XmlPullParser xpp = factory.newPullParser();
 
         container.setParser( xpp );
     }
 
 
+    /**
+     * Sets the input string the parser is going to parse
+     *
+     * @param str
+     *      the string the parser is going to parse
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInput( String str ) throws FileNotFoundException, XmlPullParserException
     {
         container.getParser().setInput( new StringReader( str ) );
     }
 
 
+    /**
+     * Sets the input file the parser is going to parse
+     *
+     * @param fileName
+     *      the name of the file
+     * @throws FileNotFoundException
+     *      if the file does not exist
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
     {
         Reader reader = new FileReader( fileName );
@@ -66,13 +98,30 @@
     }
 
 
+    /**
+     * Sets the input stream the parser is going to process
+     *
+     * @param inputStream
+     *      contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
+     * @param inputEncoding
+     *      if not null it MUST be used as encoding for inputStream
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
     {
         container.getParser().setInput( inputStream, inputEncoding );
     }
 
 
-    public void parse() throws Exception
+    /**
+     * Launches the parsing on the input
+     * 
+     * @throws XmlPullParserException 
+     *      when an unrecoverable error occurs
+     * @throws IOException
+     */
+    public void parse() throws XmlPullParserException, IOException
     {
         Dsmlv2ResponseGrammar grammar = Dsmlv2ResponseGrammar.getInstance();
 
@@ -80,6 +129,12 @@
     }
 
 
+    /**
+     * Launches the parsing of the Batch Response only
+     *
+     * @throws XmlPullParserException
+     *      if an error occurs in the parser
+     */
     public void parseBatchResponse() throws XmlPullParserException
     {
         XmlPullParser xpp = container.getParser();
@@ -117,6 +172,16 @@
     }
 
 
+    /**
+     * Processes the task required in the grammar to the given tag type
+     *
+     * @param container
+     *      the DSML container
+     * @param tagType
+     *      the tag type
+     * @throws XmlPullParserException 
+     *      when an error occurs during the parsing
+     */
     private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
     {
         XmlPullParser xpp = container.getParser();
@@ -142,6 +207,12 @@
     }
 
 
+    /**
+     * Gets the Batch Response or null if the it has not been parsed yet
+     *
+     * @return 
+     *      the Batch Response or null if the it has not been parsed yet
+     */
     public BatchResponse getBatchResponse()
     {
         return container.getBatchResponse();
@@ -150,9 +221,10 @@
 
     /**
      * Returns the next Request or null if there's no more request
-     * @return the next Request or null if there's no more request
+     * @return
+     *      the next Request or null if there's no more request
      * @throws XmlPullParserException 
-     * @throws Exception
+     *      when an error occurs during the parsing
      */
     public LdapResponse getNextResponse() throws XmlPullParserException
     {
@@ -214,7 +286,13 @@
     }
 
 
-    public void parseAllResponses() throws Exception
+    /**
+     * Parses all the responses
+     *
+     * @throws XmlPullParserException
+     *      when an error occurs during the parsing
+     */
+    public void parseAllResponses() throws XmlPullParserException
     {
         while ( getNextResponse() != null )
         {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2StatesEnum.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2StatesEnum.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2StatesEnum.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Dsmlv2StatesEnum.java Fri Dec 29 06:59:46 2006
@@ -24,6 +24,9 @@
 /**
  * This class store the Dsml grammar's constants. It is also used for debugging
  * purpose
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class Dsmlv2StatesEnum implements IStates
 {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarAction.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarAction.java Fri Dec 29 06:59:46 2006
@@ -26,24 +26,19 @@
  * Those informations are not mandatory, but they can be usefull for debugging.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public abstract class GrammarAction implements IAction
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
     /** The action's name */
     protected String name;
 
 
-    // ~ Constructors
-    // -------------------------------------------------------------------------------
-
     /**
      * Creates a new GrammarAction object.
      * 
      * @param name
-     *            The name of the create daction
+     *      the name of the create daction
      */
     public GrammarAction( String name )
     {
@@ -51,13 +46,11 @@
     }
 
 
-    // ~ Methods
-    // ------------------------------------------------------------------------------------
-
     /**
      * Print the action's name
      * 
-     * @return The action's name
+     * @return 
+     *      the action's name
      */
     public String toString()
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarTransition.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarTransition.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarTransition.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/GrammarTransition.java Fri Dec 29 06:59:46 2006
@@ -26,12 +26,10 @@
  * state, and the action to execute while transiting.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class GrammarTransition
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
     /** The next state in the grammar */
     private int nextState;
 
@@ -41,19 +39,16 @@
     /** The current state */
     private int currentState;
 
-
-    // ~ Constructors
-    // -------------------------------------------------------------------------------
-
+    
     /**
      * Creates a new GrammarTransition object.
      * 
      * @param currentState
-     *            The current transition
+     *      The current transition
      * @param nextState
-     *            The target state
+     *      The target state
      * @param action
-     *            The action to execute. It could be null.
+     *      The action to execute. It could be null.
      */
     public GrammarTransition( int currentState, int nextState, GrammarAction action )
     {
@@ -62,12 +57,11 @@
         this.action = action;
     }
 
-
-    // ~ Methods
-    // ------------------------------------------------------------------------------------
-
     /**
-     * @return Returns the target state.
+     * Gets the target state
+     * 
+     * @return
+     *      the target state.
      */
     public int getNextState()
     {
@@ -78,7 +72,8 @@
     /**
      * Tells if the transition has an associated action.
      * 
-     * @return <code>true</code> if an action has been asociated to the
+     * @return 
+     *      <code>true</code> if an action has been asociated to the
      *         transition
      */
     public boolean hasAction()
@@ -88,7 +83,10 @@
 
 
     /**
-     * @return Returns the action associated with the transition
+     * Gets the action associated with the transition
+     * 
+     * @return
+     *      the action associated with the transition
      */
     public GrammarAction getAction()
     {
@@ -97,9 +95,14 @@
 
 
     /**
+     * Returns a representation of the transition as a string
+     * 
      * @param grammar
-     *            The grammar which state we want a String from
-     * @return A representation of the transition as a string.
+     *      the grammar which state we want a String from
+     * @param statesEnum
+     *      the states enum that contains the states' names
+     * @return 
+     *      a representation of the transition as a string.
      */
     public String toString( int grammar, IStates statesEnum )
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IAction.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IAction.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IAction.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IAction.java Fri Dec 29 06:59:46 2006
@@ -29,6 +29,7 @@
  * in all the implementong classes.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public interface IAction
 {
@@ -39,9 +40,9 @@
      * The action to be executed.
      * 
      * @param container
-     *            The container which stores the current data
-     * @throws DecoderException
-     *             Thrown if something went wrong.
+     *      the container which stores the current data
+     * @throws XmlPullParserException
+     *      thrown if something went wrong.
      */
     public void action( Dsmlv2Container container ) throws XmlPullParserException;
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IGrammar.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IGrammar.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IGrammar.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IGrammar.java Fri Dec 29 06:59:46 2006
@@ -21,7 +21,9 @@
 package org.apache.directory.ldapstudio.dsmlv2;
 
 
-import org.apache.directory.shared.asn1.codec.DecoderException;
+import java.io.IOException;
+
+import org.xmlpull.v1.XmlPullParserException;
 
 
 /**
@@ -36,12 +38,13 @@
      * This method, when called, execute an action on the current data stored in
      * the container.
      * 
-     * @param asn1Container
-     *            Store the data being processed.
-     * @throws DecoderException
-     *             Thrown when an unrecoverable error occurs.
+     * @param container
+     *            the DSML container
+     * @throws XmlPullParserException
+     *      Thrown when an unrecoverable error occurs.
+     * @throws IOException
      */
-    void executeAction( Dsmlv2Container container ) throws Exception;
+    void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException;
 
 
     /**

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IStates.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IStates.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IStates.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/IStates.java Fri Dec 29 06:59:46 2006
@@ -23,6 +23,9 @@
 
 /**
  * This interface is used to store the different states of a grammar.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public interface IStates
 {
@@ -36,6 +39,13 @@
     static int END_STATE = -1;
 
 
-    /** Get the current state for a specified grammar */
+    /** 
+     * Gets the specified state
+     * 
+     * @param state
+     *      the identifier of the state
+     * @return
+     *      the specified state
+     */
     String getState( int state );
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/ParserUtils.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/ParserUtils.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/ParserUtils.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/ParserUtils.java Fri Dec 29 06:59:46 2006
@@ -1,23 +1,32 @@
-
 package org.apache.directory.ldapstudio.dsmlv2;
 
+
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
+
+/**
+ * This class is a Helper class for the DSML Parser
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ParserUtils
 {
     public static final String XML_SCHEMA_URI = "http://www.w3c.org/2001/XMLSchema";
     public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3c.org/2001/XMLSchema-instance";
     public static final String BASE64BINARY = "base64Binary";
 
-    
+
     /**
      * Returns the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
      *
-     * @param xpp the XPP parser to use
-     * @return the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
+     * @param xpp 
+     *      the XPP parser to use
+     * @return 
+     *      the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
      */
     public static String getXsiTypeAttributeValue( XmlPullParser xpp )
     {
@@ -26,7 +35,8 @@
         for ( int i = 0; i < nbAttributes; i++ )
         {
             // Checking if the attribute 'type' from XML Schema Instance namespace is used.
-            if ( xpp.getAttributeName( i ).equals( "type" ) && xpp.getNamespace( xpp.getAttributePrefix( i ) ).equals( XML_SCHEMA_INSTANCE_URI ))
+            if ( xpp.getAttributeName( i ).equals( "type" )
+                && xpp.getNamespace( xpp.getAttributePrefix( i ) ).equals( XML_SCHEMA_INSTANCE_URI ) )
             {
                 type = xpp.getAttributeValue( i );
                 break;
@@ -34,13 +44,17 @@
         }
         return type;
     }
-    
+
+
     /**
-     * Returns true if the value of the current tag is Base64Binary encoded
-     *
-     * @param parser the XPP parser to use
-     * @param attrValue the attribute value
-     * @return true if the value of the current tag is Base64BinaryEncoded, false if not
+     * Tells is the given value is a Base64 binary value
+     * 
+     * @param parser
+     *      the XPP parser to use
+     * @param attrValue 
+     *      the attribute value
+     * @return 
+     *      true if the value of the current tag is Base64BinaryEncoded, false if not
      */
     public static boolean isBase64BinaryValue( XmlPullParser parser, String attrValue )
     {
@@ -50,17 +64,19 @@
         }
         // We are looking for something that should look like that: "aNameSpace:base64Binary"
         // We split the String. The first element should be the namespace prefix and the second "base64Binary"
-        String [] splitedString = attrValue.split( ":" );
-        return ( splitedString.length == 2 ) 
-                && ( XML_SCHEMA_URI.equals( parser.getNamespace( splitedString[0] ) ) ) 
-                && ( BASE64BINARY.equals( splitedString[1] ) );
+        String[] splitedString = attrValue.split( ":" );
+        return ( splitedString.length == 2 ) && ( XML_SCHEMA_URI.equals( parser.getNamespace( splitedString[0] ) ) )
+            && ( BASE64BINARY.equals( splitedString[1] ) );
     }
-    
+
+
     /**
      * Indicates if the value needs to be encoded as Base64
      *
-     * @param value the value to check
-     * @return true if the value needs to be encoded as Base64
+     * @param value 
+     *      the value to check
+     * @return 
+     *      true if the value needs to be encoded as Base64
      */
     public static boolean needsBase64Encoding( Object value )
     {
@@ -70,51 +86,60 @@
         }
         else if ( value instanceof String )
         {
-            return !LdifUtils.isLDIFSafe( (String) value );
+            return !LdifUtils.isLDIFSafe( ( String ) value );
         }
         return true;
     }
-    
+
+
     /**
      * Encodes the value as a Base64 String
      *
-     * @param value the value to encode
-     * @return the value encoded as a Base64 String 
+     * @param value 
+     *      the value to encode
+     * @return 
+     *      the value encoded as a Base64 String 
      */
     public static String base64Encode( Object value )
     {
         if ( value instanceof byte[] )
         {
-            return new String( Base64.encode( (byte[]) value ) );
+            return new String( Base64.encode( ( byte[] ) value ) );
         }
         else if ( value instanceof String )
         {
-            return new String( Base64.encode( (( String ) value).getBytes() ) );
+            return new String( Base64.encode( ( ( String ) value ).getBytes() ) );
         }
-        
+
         return "";
     }
-    
+
+
     /**
      * Parses and verify the parsed value of the requestID
-     * @param attributeValue the value of the attribute
-     * @param xpp the XmlPullParser
-     * @return the int value of the resquestID
-     * @throws XmlPullParserException if RequestID isn't an Integer and if requestID equals 0
+     * 
+     * @param attributeValue 
+     *      the value of the attribute
+     * @param xpp 
+     *      the XmlPullParser
+     * @return
+     *      the int value of the resquestID
+     * @throws XmlPullParserException
+     *      if RequestID isn't an Integer and if requestID equals 0
      */
     public static int parseAndVerifyRequestID( String attributeValue, XmlPullParser xpp ) throws XmlPullParserException
     {
-    	try
-    	{
-        	int requestID = Integer.parseInt( attributeValue );
-        	
-        	if ( requestID == 0 )
-        	{
-        		throw new XmlPullParserException( "The attribute requestID can't be equal to 0", xpp, null );
-        	}
-        	
-        	return requestID;
-    	}
+        try
+        {
+            int requestID = Integer.parseInt( attributeValue );
+
+            if ( requestID == 0 )
+            {
+                throw new XmlPullParserException( "The attribute requestID can't be equal to 0", xpp, null );
+            }
+
+            return requestID;
+        }
         catch ( NumberFormatException e )
         {
             throw new XmlPullParserException( "the given requestID is not an integer", xpp, null );

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Tag.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Tag.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Tag.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/Tag.java Fri Dec 29 06:59:46 2006
@@ -21,16 +21,40 @@
 package org.apache.directory.ldapstudio.dsmlv2;
 
 
+/**
+ * This class represents a XML tag.
+ * A XML tag is defined with :
+ * <ul>
+ *      <li>a name</li>
+ *      <li>a type (START tag or END tag)</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class Tag
 {
-
+    /** The name of the tag */
     private String name;
+
+    /** The type of the tag */
     private int type;
 
+    /** This int represents a START tag */
     public static int START = 0;
+
+    /** This int represents a END tag */
     public static int END = 1;
 
 
+    /**
+     * Creates a new instance of Tag.
+     *
+     * @param name
+     *      the name of the tag
+     * @param type
+     *      the type of the tag
+     */
     public Tag( String name, int type )
     {
         setName( name );
@@ -38,30 +62,57 @@
     }
 
 
+    /**
+     * Gets the name of the tag
+     *
+     * @return
+     *      the name of the tag
+     */
     public String getName()
     {
         return name;
     }
 
 
+    /**
+     * Sets the name of the tag
+     *
+     * @param name
+     *      the name to set
+     */
     public void setName( String name )
     {
         this.name = name.toLowerCase();
     }
 
 
+    /**
+     * Gets the type of the tag
+     *
+     * @return
+     *      the type of the tag
+     */
     public int getType()
     {
         return type;
     }
 
 
+    /**
+     * Sets the type of the tag
+     *
+     * @param type
+     *      the type to set
+     */
     public void setType( int type )
     {
         this.type = type;
     }
 
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
     @Override
     public boolean equals( Object obj )
     {
@@ -78,14 +129,19 @@
     }
 
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
     @Override
     public int hashCode()
     {
-
         return name.hashCode() + type << 24;
     }
 
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
     @Override
     public String toString()
     {
@@ -98,5 +154,4 @@
             return "Unknown tag";
         }
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/engine/Dsmlv2Engine.java Fri Dec 29 06:59:46 2006
@@ -83,6 +83,9 @@
 /**
  * This is the DSMLv2Engine. It can be use to execute operations on a LDAP Server and get the results of these operations.
  * The format used for request and responses is the DSMLv2 format.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class Dsmlv2Engine
 {
@@ -113,12 +116,16 @@
 
 
     /**
-     * Default Constructor
+     * Creates a new instance of Dsmlv2Engine.
      * 
-     * @param host the server host
-     * @param port the server port
-     * @param user the server admin DN
-     * @param password the server admin DN's password
+     * @param host 
+     *      the server host
+     * @param port 
+     *      the server port
+     * @param user 
+     *      the server admin DN
+     * @param password 
+     *      the server admin's password
      */
     public Dsmlv2Engine( String host, int port, String user, String password )
     {
@@ -131,60 +138,67 @@
 
     /**
      * Processes the file given and return the result of the operations
-     * @param dsmlInput The DSMLv2 formatted request input
-     * @return The XML response in DSMLv2 Format
+     * 
+     * @param dsmlInput 
+     *      the DSMLv2 formatted request input
+     * @return
+     *      the XML response in DSMLv2 Format
      * @throws XmlPullParserException
-     * @throws FileNotFoundException
+     *      if an error occurs in the parser
      */
-    public String processDSML( String dsmlInput ) throws XmlPullParserException, FileNotFoundException
+    public String processDSML( String dsmlInput ) throws XmlPullParserException
     {
         parser = new Dsmlv2Parser();
-
         parser.setInput( dsmlInput );
-
         return processDSML();
     }
 
 
     /**
      * Processes the file given and return the result of the operations
-     * @param fileName The path to the file
-     * @return The XML response in DSMLv2 Format
+     * 
+     * @param fileName 
+     *      the path to the file
+     * @return 
+     *      the XML response in DSMLv2 Format
      * @throws XmlPullParserException
+     *      if an error occurs in the parser
      * @throws FileNotFoundException
+     *      if the file does not exist
      */
     public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
     {
         parser = new Dsmlv2Parser();
-
         parser.setInputFile( fileName );
-
         return processDSML();
     }
 
 
     /**
      * Processes the file given and return the result of the operations
-     * @param inputStream contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null).
-     * @param inputEncoding if not null it MUST be used as encoding for inputStream
-     * @return The XML response in DSMLv2 Format
+     * 
+     * @param inputStream 
+     *      contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null).
+     * @param inputEncoding 
+     *      if not null it MUST be used as encoding for inputStream
+     * @return 
+     *      the XML response in DSMLv2 Format
      * @throws XmlPullParserException
-     * @throws FileNotFoundException
+     *      if an error occurs in the parser
      */
-    public String processDSML( InputStream inputStream, String inputEncoding ) throws XmlPullParserException,
-        FileNotFoundException
+    public String processDSML( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
     {
         parser = new Dsmlv2Parser();
-
         parser.setInput( inputStream, inputEncoding );
-
         return processDSML();
     }
 
 
     /**
      * Processes the Request document
-     * @return The XML response in DSMLv2 Format
+     * 
+     * @return 
+     *      the XML response in DSMLv2 Format
      */
     private String processDSML()
     {
@@ -302,14 +316,15 @@
 
     /**
      * Processes a single request
-     * @param request the request to process
+     * 
+     * @param request 
+     *      the request to process
      * @throws EncoderException 
      * @throws IOException 
      * @throws NamingException 
      * @throws DecoderException 
      */
-    private void processRequest( LdapMessage request ) throws EncoderException, IOException, DecoderException,
-        NamingException
+    private void processRequest( LdapMessage request ) throws EncoderException, IOException, DecoderException, NamingException
     {
         LdapMessage message = new LdapMessage();
 
@@ -424,9 +439,13 @@
 
     /**
      * Processes the BatchRequest
-     *     - Parsing and Getting BatchRequest
-     *     - Getting and registering options from BatchRequest
+     * <ul>
+     *     <li>Parsing and Getting BatchRequest</li>
+     *     <li>Getting and registering options from BatchRequest</li>
+     * </ul>
+     *     
      * @throws XmlPullParserException
+     *      if an error occurs in the parser
      */
     private void processBatchRequest() throws XmlPullParserException
     {
@@ -454,8 +473,11 @@
 
     /**
      * XML Pretty Printer XSLT Tranformation
+     * 
      * @param document
+     *      the Dom4j Document
      * @param stylesheet
+     *      the stylesheet to use
      * @return
      */
     public Document styleDocument( Document document, String stylesheet )
@@ -499,23 +521,25 @@
      * in the options from the command line, or the default values.
      * 
      * @throws UnknownHostException
-     *             The hostname or the Address of server could not be found
+     *      if the hostname or the Address of server could not be found
      * @throws IOException
-     *             There was a error opening or establishing the socket
+     *      if there was a error opening or establishing the socket
      */
     private void connect() throws UnknownHostException, IOException
     {
         serverAddress = new InetSocketAddress( host, port );
         channel = SocketChannel.open( serverAddress );
-
         channel.configureBlocking( true );
     }
 
 
     /**
      * Sends a message
+     * 
      * @param bb
+     *      the message as a byte buffer
      * @throws IOException
+     *      if the message could not be sent
      */
     private void sendMessage( ByteBuffer bb ) throws IOException
     {
@@ -526,8 +550,11 @@
 
     /**
      * Reads the response to a request
+     * 
      * @param bb
+     *      the response as a byte buffer
      * @return the response
+     *      the response as a LDAP message
      * @throws IOException
      * @throws DecoderException
      * @throws NamingException
@@ -592,10 +619,14 @@
 
 
     /**
-     * Bind to the ldap server
+     * Binds to the ldap server
      * 
-     * @param messageId The message Id
-     * @throws NamingException 
+     * @param messageId 
+     *      the message Id
+     * @throws EncoderException
+     * @throws DecoderException
+     * @throws IOException
+     * @throws NamingException
      */
     private void bind( int messageId ) throws EncoderException, DecoderException, IOException, NamingException
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AddResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AddResponseDsml.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AddResponseDsml.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AddResponseDsml.java Fri Dec 29 06:59:46 2006
@@ -27,12 +27,17 @@
 
 /**
  * DSML Decorator for AddResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class AddResponseDsml extends LdapResponseDecorator implements DsmlDecorator
 {
     /**
-     * Default constructor
-     * @param ldapMessage the message to decorate
+     * Creates a new instance of AddResponseDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
      */
     public AddResponseDsml( LdapMessage ldapMessage )
     {
@@ -40,9 +45,8 @@
     }
 
 
-    /**
-     * Get the message type
-     * @return Returns the type.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
     public int getMessageType()
     {
@@ -50,10 +54,8 @@
     }
 
 
-    /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
     public Element toDsml( Element root )
     {

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AuthResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AuthResponseDsml.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AuthResponseDsml.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/AuthResponseDsml.java Fri Dec 29 06:59:46 2006
@@ -27,12 +27,17 @@
 
 /**
  * DSML Decorator for AuthResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class AuthResponseDsml extends LdapResponseDecorator implements DsmlDecorator
 {
     /**
-     * Default constructor
-     * @param ldapMessage the message to decorate
+     * Creates a new instance of AuthResponseDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
      */
     public AuthResponseDsml( LdapMessage ldapMessage )
     {
@@ -40,9 +45,8 @@
     }
 
 
-    /**
-     * Get the message type
-     * @return Returns the type.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
     public int getMessageType()
     {
@@ -50,10 +54,8 @@
     }
 
 
-    /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
     public Element toDsml( Element root )
     {
@@ -63,5 +65,4 @@
         ldapResultDsml.toDsml( element );
         return element;
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/CompareResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/CompareResponseDsml.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/CompareResponseDsml.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/CompareResponseDsml.java Fri Dec 29 06:59:46 2006
@@ -27,12 +27,17 @@
 
 /**
  * DSML Decorator for CompareResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class CompareResponseDsml extends LdapResponseDecorator implements DsmlDecorator
 {
     /**
-     * Default constructor
-     * @param ldapMessage the message to decorate
+     * Creates a new instance of CompareResponseDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
      */
     public CompareResponseDsml( LdapMessage ldapMessage )
     {
@@ -40,9 +45,8 @@
     }
 
 
-    /**
-     * Get the message type
-     * @return Returns the type.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
     public int getMessageType()
     {
@@ -50,10 +54,8 @@
     }
 
 
-    /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
     public Element toDsml( Element root )
     {
@@ -63,5 +65,4 @@
         ldapResultDsml.toDsml( element );
         return element;
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DelResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DelResponseDsml.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DelResponseDsml.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DelResponseDsml.java Fri Dec 29 06:59:46 2006
@@ -27,12 +27,17 @@
 
 /**
  * DSML Decorator for DelResponse
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class DelResponseDsml extends LdapResponseDecorator implements DsmlDecorator
 {
     /**
-     * Default constructor
-     * @param ldapMessage the message to decorate
+     * Creates a new instance of DelResponseDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
      */
     public DelResponseDsml( LdapMessage ldapMessage )
     {
@@ -40,9 +45,8 @@
     }
 
 
-    /**
-     * Get the message type
-     * @return Returns the type.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
     public int getMessageType()
     {
@@ -50,10 +54,8 @@
     }
 
 
-    /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
     public Element toDsml( Element root )
     {
@@ -63,5 +65,4 @@
         ldapResultDsml.toDsml( element );
         return element;
     }
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DsmlDecorator.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DsmlDecorator.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DsmlDecorator.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/DsmlDecorator.java Fri Dec 29 06:59:46 2006
@@ -26,14 +26,19 @@
 
 /**
  * This interface defines the methods that must be implemented to define a DSML Decorator
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public interface DsmlDecorator
 {
     /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+     * Converts the request/reponse to its XML representation in the DSMLv2 format
+     * 
+     * @param root 
+     *      the root dom4j Element
+     * @return 
+     *      the dom4j Element corresponding to the entry.
      */
     public Element toDsml( Element root );
-
 }

Modified: directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ErrorResponse.java
URL: http://svn.apache.org/viewvc/directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ErrorResponse.java?view=diff&rev=491023&r1=491022&r2=491023
==============================================================================
--- directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ErrorResponse.java (original)
+++ directory/trunks/ldapstudio/ldapstudio-dsml-parser/src/main/java/org/apache/directory/ldapstudio/dsmlv2/reponse/ErrorResponse.java Fri Dec 29 06:59:46 2006
@@ -26,42 +26,63 @@
 
 
 /**
- * Class representing Error Response.
- * 
+ * Class representing Error Response. <br>
+ * <br>
  * An Error Response has a requestID, a message, and a type which can be :
- *     - NOT_ATTEMPTED,
- *     - COULD_NOT_CONNECT,
- *     - CONNECTION_CLOSED,
- *     - MALFORMED_REQUEST,
- *     - GATEWAY_INTERNAL_ERROR,
- *     - AUTHENTICATION_FAILED,
- *     - UNRESOLVABLE_URI,
- *     - OTHER
+ * <ul> 
+ *     <li>NOT_ATTEMPTED,</li>
+ *     <li>COULD_NOT_CONNECT,</li>
+ *     <li>CONNECTION_CLOSED,</li>
+ *     <li>MALFORMED_REQUEST,</li>
+ *     <li>GATEWAY_INTERNAL_ERROR,</li>
+ *     <li>AUTHENTICATION_FAILED,</li>
+ *     <li>UNRESOLVABLE_URI,</li>
+ *     <li>OTHER</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
  */
 public class ErrorResponse extends LdapResponse implements DsmlDecorator
 {
+    /**
+     * This enum represents the different types of error response
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     public enum ErrorResponseType
     {
         NOT_ATTEMPTED, COULD_NOT_CONNECT, CONNECTION_CLOSED, MALFORMED_REQUEST, GATEWAY_INTERNAL_ERROR, AUTHENTICATION_FAILED, UNRESOLVABLE_URI, OTHER
     };
 
+    /** The type of error response */
     private ErrorResponseType type;
 
+    /** The associated message */
     private String message;
 
+    /** The request ID */
     private int requestID;
 
 
+    /**
+     * Creates a new instance of ErrorResponse.
+     */
     public ErrorResponse()
     {
     }
 
 
     /**
-     * Default constructor
-     * @param requestID The requestID of the response
-     * @param type The type of the response
-     * @param message The associated message
+     * Creates a new instance of ErrorResponse.
+     *
+     * @param requestID
+     *      the requestID of the response
+     * @param type 
+     *      the type of the response
+     * @param message
+     *      the associated message
      */
     public ErrorResponse( int requestID, ErrorResponseType type, String message )
     {
@@ -71,10 +92,8 @@
     }
 
 
-    /**
-     * Convert the request to its XML representation in the DSMLv2 format.
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
+    /* (non-Javadoc)
+     * @see org.apache.directory.ldapstudio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
     public Element toDsml( Element root )
     {
@@ -103,8 +122,11 @@
 
     /**
      * Returns the String associated to the error response type
-     * @param type the error response type
-     * @return the corresponding String
+     * 
+     * @param type 
+     *      the error response type
+     * @return 
+     *      the corresponding String
      */
     public String getTypeDescr( ErrorResponseType type )
     {
@@ -147,36 +169,72 @@
     }
 
 
+    /**
+     * Gets the message
+     *
+     * @return
+     *      the message
+     */
     public String getMessage()
     {
         return message;
     }
 
 
+    /**
+     * Sets the message
+     *
+     * @param message
+     *      the message to set
+     */
     public void setMessage( String message )
     {
         this.message = message;
     }
 
 
+    /**
+     * Gets the request ID
+     *
+     * @return
+     *      the request ID
+     */
     public int getRequestID()
     {
         return requestID;
     }
 
 
+    /**
+     * Sets the request ID
+     *
+     * @param requestID
+     *      the request ID to set
+     */
     public void setRequestID( int requestID )
     {
         this.requestID = requestID;
     }
 
 
+    /**
+     * Gets the type of error response
+     *
+     * @return
+     *      the type of error response
+     */
     public ErrorResponseType getType()
     {
         return type;
     }
 
 
+    /**
+     * Sets the type of error response
+     *
+     * @param type
+     *      the type of error response to set
+     */
     public void setType( ErrorResponseType type )
     {
         this.type = type;



Mime
View raw message