directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r679825 - in /directory/studio/trunk: ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/ studio-dsml-parser/src/main/java/org/apache/...
Date Fri, 25 Jul 2008 14:56:58 GMT
Author: pamarcelot
Date: Fri Jul 25 07:56:57 2008
New Revision: 679825

URL: http://svn.apache.org/viewvc?rev=679825&view=rev
Log:
Part of a fix for DIRSTUDIO-359 (Improve DSML parser classes).

Modified:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ExtendedRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java Fri Jul 25 07:56:57 2008
@@ -21,13 +21,18 @@
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
+import java.io.BufferedWriter;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.PrintStream;
+import java.io.OutputStreamWriter;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.naming.InvalidNameException;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.SearchResult;
+
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
@@ -39,7 +44,8 @@
 import org.apache.directory.shared.ldap.codec.search.NotFilter;
 import org.apache.directory.shared.ldap.codec.search.OrFilter;
 import org.apache.directory.shared.ldap.codec.search.PresentFilter;
-import org.apache.directory.shared.ldap.codec.search.SearchRequest;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
@@ -55,19 +61,18 @@
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
-import org.apache.directory.shared.ldap.message.ScopeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
-import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
-import org.apache.directory.studio.dsmlv2.request.SearchRequestDsml;
+import org.apache.directory.studio.dsmlv2.reponse.BatchResponseDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResultDoneDsml;
+import org.apache.directory.studio.dsmlv2.reponse.SearchResultEntryDsml;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.Control;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
-import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.XMLWriter;
 
 
 /**
@@ -140,93 +145,27 @@
 
         try
         {
-            SearchRequest searchRequest = new SearchRequest();
-            searchRequest.setProtocolOP( searchRequest );
-
-            // DN
-            searchRequest.setBaseObject( searchParameter.getSearchBase( ) );
-
-            // Scope
-            SearchScope scope = searchParameter.getScope();
-            if ( scope == SearchScope.OBJECT )
-            {
-                searchRequest.setScope( ScopeEnum.BASE_OBJECT );
-            }
-            else if ( scope == SearchScope.ONELEVEL )
-            {
-                searchRequest.setScope( ScopeEnum.SINGLE_LEVEL );
-            }
-            else if ( scope == SearchScope.SUBTREE )
-            {
-                searchRequest.setScope( ScopeEnum.WHOLE_SUBTREE );
-            }
-
-            // DerefAliases
-            Connection.AliasDereferencingMethod derefAliases = searchParameter.getAliasesDereferencingMethod();
-            switch ( derefAliases )
-            {
-                case ALWAYS:
-                    searchRequest.setDerefAliases( LdapConstants.DEREF_ALWAYS );
-                    break;
-                case FINDING:
-                    searchRequest.setDerefAliases( LdapConstants.DEREF_FINDING_BASE_OBJ );
-                    break;
-                case NEVER:
-                    searchRequest.setDerefAliases( LdapConstants.NEVER_DEREF_ALIASES );
-                    break;
-                case SEARCH:
-                    searchRequest.setDerefAliases( LdapConstants.DEREF_IN_SEARCHING );
-                    break;
-                default:
-                    break;
-            }
-
-            // Time Limit
-            int timeLimit = searchParameter.getTimeLimit();
-            if ( timeLimit != 0 )
-            {
-                searchRequest.setTimeLimit( timeLimit );
-            }
-
-            // Size Limit
-            int countLimit = searchParameter.getCountLimit();
-            if ( countLimit != 0 )
-            {
-                searchRequest.setSizeLimit( countLimit );
-            }
+            BatchResponseDsml batchResponse = new BatchResponseDsml();
 
-            // Filter
-            searchRequest.setFilter( convertToSharedLdapFilter( searchParameter.getFilter() ) );
+            NamingEnumeration<SearchResult> result = SearchRunnable
+                .search( browserConnection, searchParameter, monitor );
 
-            // Attributes
-            String[] returningAttributes = searchParameter.getReturningAttributes();
-            for ( int i = 0; i < returningAttributes.length; i++ )
+            while ( result.hasMoreElements() )
             {
-                searchRequest.addAttribute( returningAttributes[i] );
+                SearchResult searchResult = ( SearchResult ) result.nextElement();
+                SearchResultEntryDsml sreDsml = convertToDsmlSearchResult( searchResult );
+                batchResponse.addResponse( sreDsml );
             }
 
-            // Controls
-            List<org.apache.directory.shared.ldap.codec.Control> sharedLdapControls = convertToSharedLdapControls( searchParameter
-                .getControls() );
-            for ( int i = 0; i < sharedLdapControls.size(); i++ )
-            {
-                searchRequest.addControl( sharedLdapControls.get( i ) );
-            }
+            batchResponse.addResponse( new SearchResultDoneDsml( new SearchResultDone() ) );
 
-            // Executing the request
-            Document xmlRequest = DocumentHelper.createDocument();
-            Element rootElement = xmlRequest.addElement( "batchRequest" );
-            SearchRequestDsml searchRequestDsml = new SearchRequestDsml( searchRequest );
-            searchRequestDsml.toDsml( rootElement );
-            Dsmlv2Engine engine = new Dsmlv2Engine( browserConnection.getConnection().getHost(), browserConnection
-                .getConnection().getPort(), browserConnection.getConnection().getBindPrincipal(), browserConnection
-                .getConnection().getBindPassword() );
-            String response = engine.processDSML( xmlRequest.asXML() );
-
-            // Saving the response
-            FileOutputStream fout = new FileOutputStream( exportDsmlFilename );
-            new PrintStream( fout ).println( response );
-            fout.close();
+            FileOutputStream fos = new FileOutputStream( exportDsmlFilename );
+            OutputStreamWriter osw = new OutputStreamWriter( fos );
+            BufferedWriter bufferedWriter = new BufferedWriter( osw );
+            bufferedWriter.write( batchResponse.toDsml() );
+            bufferedWriter.close();
+            osw.close();
+            fos.close();
         }
         catch ( Exception e )
         {
@@ -244,6 +183,26 @@
     }
 
 
+    private SearchResultEntryDsml convertToDsmlSearchResult( SearchResult searchResult )
+    {
+        try
+        {
+            SearchResultEntry sre = new SearchResultEntry();
+            sre.setObjectName( new LdapDN( searchResult.getNameInNamespace() ) );
+            sre.setPartialAttributeList( searchResult.getAttributes() );
+
+            return new SearchResultEntryDsml( sre );
+        }
+        catch ( InvalidNameException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        return null;
+    }
+
+
     /**
      * Converts a String filter into a Shared LDAP Filter.
      *
@@ -280,33 +239,33 @@
         {
             BranchNode branchNode = ( BranchNode ) exprNode;
 
-            if( branchNode instanceof AndNode )
+            if ( branchNode instanceof AndNode )
             {
                 AndFilter andFilter = new AndFilter();
                 sharedLdapFilter = andFilter;
-                
+
                 List<Filter> andFilters = iterateOnFilters( branchNode.getChildren() );
                 for ( int i = 0; i < andFilters.size(); i++ )
                 {
                     andFilter.addFilter( andFilters.get( i ) );
                 }
             }
-            else if( branchNode instanceof OrNode )
+            else if ( branchNode instanceof OrNode )
             {
                 OrFilter orFilter = new OrFilter();
                 sharedLdapFilter = orFilter;
-                
+
                 List<Filter> orFilters = iterateOnFilters( branchNode.getChildren() );
                 for ( int i = 0; i < orFilters.size(); i++ )
                 {
                     orFilter.addFilter( orFilters.get( i ) );
                 }
             }
-            else if( branchNode instanceof NotNode )
+            else if ( branchNode instanceof NotNode )
             {
                 NotFilter notFilter = new NotFilter();
                 sharedLdapFilter = notFilter;
-                
+
                 List<Filter> notFilters = iterateOnFilters( branchNode.getChildren() );
                 notFilter.setNotFilter( notFilters.get( 0 ) );
             }
@@ -332,14 +291,14 @@
             }
             else if ( simpleNode instanceof EqualityNode )
             {
-                AttributeValueAssertionFilter equalityMatchFilter = createAttributeValueAssertionFilter(
-                    simpleNode, LdapConstants.EQUALITY_MATCH_FILTER );
+                AttributeValueAssertionFilter equalityMatchFilter = createAttributeValueAssertionFilter( simpleNode,
+                    LdapConstants.EQUALITY_MATCH_FILTER );
                 sharedLdapFilter = equalityMatchFilter;
             }
             else if ( simpleNode instanceof GreaterEqNode )
             {
-                AttributeValueAssertionFilter greaterOrEqualFilter = createAttributeValueAssertionFilter(
-                    simpleNode, LdapConstants.GREATER_OR_EQUAL_FILTER );
+                AttributeValueAssertionFilter greaterOrEqualFilter = createAttributeValueAssertionFilter( simpleNode,
+                    LdapConstants.GREATER_OR_EQUAL_FILTER );
                 sharedLdapFilter = greaterOrEqualFilter;
             }
             else if ( simpleNode instanceof LessEqNode )

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/engine/Dsmlv2Engine.java Fri Jul 25 07:56:57 2008
@@ -441,7 +441,7 @@
             SearchResultDone srd = response.getSearchResultDone();
             copyMessageIdAndControls( response, srd );
 
-            SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( response );
+            SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( srd );
             searchResponseDsml.addResponse( searchResultDoneDsml );
         }
 

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AddResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.add.AddResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,12 +36,21 @@
 {
     /**
      * Creates a new instance of AddResponseDsml.
+     */
+    public AddResponseDsml()
+    {
+        super( new AddResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of AddResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public AddResponseDsml( LdapMessage ldapMessage )
-    {        
+    public AddResponseDsml( AddResponse ldapMessage )
+    {
         super( ldapMessage );
     }
 

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/AuthResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.bind.BindResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of AuthResponseDsml.
+     */
+    public AuthResponseDsml()
+    {
+        super( new BindResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of AuthResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public AuthResponseDsml( LdapMessage ldapMessage )
+    public AuthResponseDsml( BindResponse ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/CompareResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.compare.CompareResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of CompareResponseDsml.
+     */
+    public CompareResponseDsml()
+    {
+        super( new CompareResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of CompareResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public CompareResponseDsml( LdapMessage ldapMessage )
+    public CompareResponseDsml( CompareResponse ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/DelResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.del.DelResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of DelResponseDsml.
+     */
+    public DelResponseDsml()
+    {
+        super( new DelResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of DelResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public DelResponseDsml( LdapMessage ldapMessage )
+    public DelResponseDsml( DelResponse ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ExtendedResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -20,7 +20,8 @@
 
 package org.apache.directory.studio.dsmlv2.reponse;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
+import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
@@ -39,16 +40,25 @@
 {
     /**
      * Creates a new instance of ExtendedResponseDsml.
+     */
+    public ExtendedResponseDsml()
+    {
+        super( new ExtendedResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of ExtendedResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ExtendedResponseDsml( LdapMessage ldapMessage )
+    public ExtendedResponseDsml( ExtendedResponse ldapMessage )
     {
         super( ldapMessage );
     }
 
-    
+
     /* (non-Javadoc)
      * @see org.apache.directory.studio.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
@@ -57,7 +67,7 @@
         return instance.getMessageType();
     }
 
-    
+
     /* (non-Javadoc)
      * @see org.apache.directory.studio.dsmlv2.reponse.DsmlDecorator#toDsml(org.dom4j.Element)
      */
@@ -69,14 +79,14 @@
         // LDAP Result
         LdapResultDsml ldapResultDsml = new LdapResultDsml( extendedResponse.getLdapResult(), instance );
         ldapResultDsml.toDsml( element );
-        
+
         // ResponseName
         String responseName = extendedResponse.getResponseName();
         if ( responseName != null )
         {
-            element.addElement( "responseName").addText( responseName );
+            element.addElement( "responseName" ).addText( responseName );
         }
-        
+
         // Response
         Object response = extendedResponse.getResponse();
         if ( response != null )
@@ -87,16 +97,62 @@
                 Namespace xsiNamespace = new Namespace( ParserUtils.XSI, ParserUtils.XML_SCHEMA_INSTANCE_URI );
                 element.getDocument().getRootElement().add( xsdNamespace );
                 element.getDocument().getRootElement().add( xsiNamespace );
-                
-                Element responseElement = element.addElement( "response").addText( ParserUtils.base64Encode( response ) );
-                responseElement.addAttribute( new QName("type", xsiNamespace), ParserUtils.XSD + ":" + ParserUtils.BASE64BINARY );
+
+                Element responseElement = element.addElement( "response" )
+                    .addText( ParserUtils.base64Encode( response ) );
+                responseElement.addAttribute( new QName( "type", xsiNamespace ), ParserUtils.XSD + ":"
+                    + ParserUtils.BASE64BINARY );
             }
             else
             {
-                element.addElement( "response").addText( response.toString() );
+                element.addElement( "response" ).addText( response.toString() );
             }
         }
-        
+
         return element;
     }
+
+
+    /**
+     * Get the extended response name
+     * 
+     * @return Returns the name.
+     */
+    public String getResponseName()
+    {
+        return ( ( ExtendedResponse ) instance ).getResponseName();
+    }
+
+
+    /**
+     * Set the extended response name
+     * 
+     * @param responseName The name to set.
+     */
+    public void setResponseName( OID responseName )
+    {
+        ( ( ExtendedResponse ) instance ).setResponseName( responseName );
+    }
+
+
+    /**
+     * Get the extended response
+     * 
+     * @return Returns the response.
+     */
+    public Object getResponse()
+    {
+        return ( ( ExtendedResponse ) instance ).getResponse();
+    }
+
+
+    /**
+     * Set the extended response
+     * 
+     * @param response The response to set.
+     */
+    public void setResponse( Object response )
+    {
+        ( ( ExtendedResponse ) instance ).setResponse( response );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/LdapResultDsml.java Fri Jul 25 07:56:57 2008
@@ -26,6 +26,8 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapResult;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
 import org.dom4j.Element;
@@ -66,14 +68,14 @@
      */
     public Element toDsml( Element root )
     {
-        
+
         // RequestID
         int requestID = message.getMessageId();
         if ( requestID != 0 )
         {
             root.addAttribute( "requestID", "" + requestID );
         }
-        
+
         // Matched DN
         String matchedDN = result.getMatchedDN();
         if ( !matchedDN.equals( "" ) )
@@ -110,4 +112,101 @@
 
         return root;
     }
+
+
+    /**
+     * Initialize the referrals list
+     */
+    public void initReferrals()
+    {
+        result.initReferrals();
+    }
+
+
+    /**
+     * Get the error message
+     * 
+     * @return Returns the errorMessage.
+     */
+    public String getErrorMessage()
+    {
+        return result.getErrorMessage();
+    }
+
+
+    /**
+     * Set the error message
+     * 
+     * @param errorMessage The errorMessage to set.
+     */
+    public void setErrorMessage( String errorMessage )
+    {
+        result.setErrorMessage( errorMessage );
+    }
+
+
+    /**
+     * Get the matched DN
+     * 
+     * @return Returns the matchedDN.
+     */
+    public String getMatchedDN()
+    {
+        return result.getMatchedDN();
+    }
+
+
+    /**
+     * Set the Matched DN
+     * 
+     * @param matchedDN The matchedDN to set.
+     */
+    public void setMatchedDN( LdapDN matchedDN )
+    {
+        result.setMatchedDN( matchedDN );
+    }
+
+
+    /**
+     * Get the referrals
+     * 
+     * @return Returns the referrals.
+     */
+    public List<LdapURL> getReferrals()
+    {
+        return result.getReferrals();
+    }
+
+
+    /**
+     * Add a referral
+     * 
+     * @param referral The referral to add.
+     */
+    public void addReferral( LdapURL referral )
+    {
+        result.addReferral( referral );
+    }
+
+
+    /**
+     * Get the result code
+     * 
+     * @return Returns the resultCode.
+     */
+    public ResultCodeEnum getResultCode()
+    {
+        return result.getResultCode();
+    }
+
+
+    /**
+     * Set the result code
+     * 
+     * @param resultCode The resultCode to set.
+     */
+    public void setResultCode( ResultCodeEnum resultCode )
+    {
+        result.setResultCode( resultCode );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModDNResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of ModDNResponseDsml.
+     */
+    public ModDNResponseDsml()
+    {
+        super( new ModifyDNResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of ModDNResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ModDNResponseDsml( LdapMessage ldapMessage )
+    public ModDNResponseDsml( ModifyDNResponse ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/ModifyResponseDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of ModifyResponseDsml.
+     */
+    public ModifyResponseDsml()
+    {
+        super( new ModifyResponse() );
+    }
+
+
+    /**
+     * Creates a new instance of ModifyResponseDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ModifyResponseDsml( LdapMessage ldapMessage )
+    public ModifyResponseDsml( ModifyResponse ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultDoneDsml.java Fri Jul 25 07:56:57 2008
@@ -21,7 +21,6 @@
 package org.apache.directory.studio.dsmlv2.reponse;
 
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.search.SearchResultDone;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.dom4j.Element;
@@ -37,11 +36,20 @@
 {
     /**
      * Creates a new instance of SearchResultDoneDsml.
+     */
+    public SearchResultDoneDsml()
+    {
+        super( new SearchResultDone() );
+    }
+
+
+    /**
+     * Creates a new instance of SearchResultDoneDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public SearchResultDoneDsml( LdapMessage ldapMessage )
+    public SearchResultDoneDsml( SearchResultDone ldapMessage )
     {
         super( ldapMessage );
     }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/reponse/SearchResultEntryDsml.java Fri Jul 25 07:56:57 2008
@@ -26,8 +26,8 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.search.SearchResultEntry;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.dsmlv2.DsmlDecorator;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
 import org.dom4j.Element;
@@ -45,11 +45,20 @@
 {
     /**
      * Creates a new instance of SearchResultEntryDsml.
+     */
+    public SearchResultEntryDsml()
+    {
+        super( new SearchResultEntry() );
+    }
+
+
+    /**
+     * Creates a new instance of SearchResultEntryDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public SearchResultEntryDsml( LdapMessage ldapMessage )
+    public SearchResultEntryDsml( SearchResultEntry ldapMessage )
     {
         super( ldapMessage );
     }
@@ -102,8 +111,8 @@
 
                         Element valueElement = attributeElement.addElement( "value" ).addText(
                             ParserUtils.base64Encode( value ) );
-                        valueElement
-                            .addAttribute( new QName( "type", xsiNamespace ), ParserUtils.XSD + ":" + ParserUtils.BASE64BINARY );
+                        valueElement.addAttribute( new QName( "type", xsiNamespace ), ParserUtils.XSD + ":"
+                            + ParserUtils.BASE64BINARY );
                     }
                     else
                     {
@@ -118,4 +127,77 @@
 
         return element;
     }
+
+
+    /**
+     * Get the entry DN
+     * 
+     * @return Returns the objectName.
+     */
+    public LdapDN getObjectName()
+    {
+        return ( ( SearchResultEntry ) instance ).getObjectName();
+    }
+
+
+    /**
+     * Set the entry DN
+     * 
+     * @param objectName The objectName to set.
+     */
+    public void setObjectName( LdapDN objectName )
+    {
+        ( ( SearchResultEntry ) instance ).setObjectName( objectName );
+    }
+
+
+    /**
+     * Get the entry's attributes
+     * 
+     * @return Returns the partialAttributeList.
+     */
+    public Attributes getPartialAttributeList()
+    {
+        return ( ( SearchResultEntry ) instance ).getPartialAttributeList();
+    }
+
+
+    /**
+     * Initialize the partial Attribute list.
+     */
+    public void setPartialAttributeList( Attributes partialAttributeList )
+    {
+        ( ( SearchResultEntry ) instance ).setPartialAttributeList( partialAttributeList );
+    }
+
+
+    /**
+     * Create a new attributeValue
+     * 
+     * @param type The attribute's name
+     */
+    public void addAttributeValues( String type )
+    {
+        ( ( SearchResultEntry ) instance ).addAttributeValues( type );
+    }
+
+
+    /**
+     * Add a new value to the current attribute
+     * 
+     * @param value
+     */
+    public void addAttributeValue( Object value )
+    {
+        ( ( SearchResultEntry ) instance ).addAttributeValue( value );
+    }
+
+
+    /**
+     * @return Returns the currentAttributeValue.
+     */
+    public String getCurrentAttributeValueType()
+    {
+        return ( ( SearchResultEntry ) instance ).getCurrentAttributeValueType();
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AbandonRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,10 +19,11 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequest;
 import org.dom4j.Element;
 
+
 /**
  * DSML Decorator for AbandonRequest
  *
@@ -33,16 +34,25 @@
 {
     /**
      * Creates a new instance of AbandonRequestDsml.
+     */
+    public AbandonRequestDsml()
+    {
+        super( new AbandonRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of AbandonRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public AbandonRequestDsml( LdapMessage ldapMessage )
+    public AbandonRequestDsml( AbandonRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -51,22 +61,44 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         AbandonRequest request = ( AbandonRequest ) instance;
-        
+
         // AbandonID
         if ( request.getAbandonedMessageId() != 0 )
         {
             element.addAttribute( "abandonID", "" + request.getAbandonedMessageId() );
         }
-        
+
         return element;
     }
+
+
+    /**
+     * Get the abandoned message ID
+     * 
+     * @return Returns the abandoned MessageId.
+     */
+    public int getAbandonedMessageId()
+    {
+        return ( ( AbandonRequest ) instance ).getAbandonedMessageId();
+    }
+
+
+    /**
+     * Set the abandoned message ID
+     * 
+     * @param abandonedMessageId The abandoned messageID to set.
+     */
+    public void setAbandonedMessageId( int abandonedMessageId )
+    {
+        ( ( AbandonRequest ) instance ).setAbandonedMessageId( abandonedMessageId );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AddRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -25,8 +25,8 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.add.AddRequest;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -43,11 +43,20 @@
 {
     /**
      * Creates a new instance of AddRequestDsml.
-     *
-     * @param ldapMessage
-     *      the message to decorate
      */
-    public AddRequestDsml( LdapMessage ldapMessage )
+    public AddRequestDsml()
+    {
+        super( new AddRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of AddRequestDsml.
+    *
+    * @param ldapMessage
+    *      the message to decorate
+    */
+    public AddRequestDsml( AddRequest ldapMessage )
     {
         super( ldapMessage );
     }
@@ -87,27 +96,27 @@
                 Attribute attribute = ( Attribute ) ne.nextElement();
                 Element attributeElement = element.addElement( "attr" );
                 attributeElement.addAttribute( "name", attribute.getID() );
-    
+
                 // Looping on Values Enumeration
                 try
                 {
                     NamingEnumeration ne2 = attribute.getAll();
-    
+
                     while ( ne2.hasMoreElements() )
                     {
                         Object value = ne2.nextElement();
-    
+
                         if ( ParserUtils.needsBase64Encoding( value ) )
                         {
                             Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
                             Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
                             attributeElement.getDocument().getRootElement().add( xsdNamespace );
                             attributeElement.getDocument().getRootElement().add( xsiNamespace );
-    
+
                             Element valueElement = attributeElement.addElement( "value" ).addText(
                                 ParserUtils.base64Encode( value ) );
-                            valueElement
-                                .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
+                            valueElement.addAttribute( new QName( "type", xsiNamespace ), "xsd:"
+                                + ParserUtils.BASE64BINARY );
                         }
                         else
                         {
@@ -123,4 +132,77 @@
 
         return element;
     }
+
+
+    /**
+     * Initialize the ArrayList for attributes.
+     */
+    public void initAttributes()
+    {
+        ( ( AddRequest ) instance ).initAttributes();
+    }
+
+
+    /**
+     * Get the entry's attributes to be added
+     * 
+     * @return Returns the attributes.
+     */
+    public Attributes getAttributes()
+    {
+        return ( ( AddRequest ) instance ).getAttributes();
+    }
+
+
+    /**
+     * Create a new attributeValue
+     * 
+     * @param type The attribute's name (called 'type' in the grammar)
+     */
+    public void addAttributeType( String type )
+    {
+        ( ( AddRequest ) instance ).addAttributeType( type );
+    }
+
+
+    /**
+     * Add a new value to the current attribute
+     * 
+     * @param value The value to be added
+     */
+    public void addAttributeValue( Object value )
+    {
+        ( ( AddRequest ) instance ).addAttributeValue( value );
+    }
+
+
+    /**
+     * Get the added DN
+     * 
+     * @return Returns the entry.
+     */
+    public LdapDN getEntry()
+    {
+        return ( ( AddRequest ) instance ).getEntry();
+    }
+
+
+    /**
+     * Set the added DN.
+     * 
+     * @param entry The entry to set.
+     */
+    public void setEntry( LdapDN entry )
+    {
+        ( ( AddRequest ) instance ).setEntry( entry );
+    }
+
+
+    /**
+     * @return Returns the currentAttribute type.
+     */
+    public String getCurrentAttributeType()
+    {
+        return ( ( AddRequest ) instance ).getCurrentAttributeType();
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/AuthRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,10 +19,11 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
 import org.apache.directory.shared.ldap.codec.bind.BindRequest;
 import org.dom4j.Element;
 
+
 /**
  * DSML Decorator for BindRequest
  *
@@ -37,12 +38,24 @@
      * @param ldapMessage
      *      the message to decorate
      */
-    public AuthRequestDsml( LdapMessage ldapMessage )
+    public AuthRequestDsml()
+    {
+        super( new BindRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of AuthRequestDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
+     */
+    public AuthRequestDsml( BindRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -51,23 +64,23 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         BindRequest request = ( BindRequest ) instance;
-        
+
         // AbandonID
         String name = request.getName().toString();
-        if ( ( name != null )  && ( !"".equals( name ) ) )
+        if ( ( name != null ) && ( !"".equals( name ) ) )
         {
             element.addAttribute( "principal", name );
         }
-        
+
         return element;
     }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/CompareRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,10 +19,12 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
 import org.apache.directory.shared.ldap.codec.compare.CompareRequest;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.dom4j.Element;
 
+
 /**
  * DSML Decorator for CompareRequest
  *
@@ -33,16 +35,25 @@
 {
     /**
      * Creates a new instance of CompareRequestDsml.
+     */
+    public CompareRequestDsml()
+    {
+        super( new CompareRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of CompareRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public CompareRequestDsml( LdapMessage ldapMessage )
+    public CompareRequestDsml( CompareRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -51,33 +62,99 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         CompareRequest request = ( CompareRequest ) instance;
-        
+
         // DN
         if ( request.getEntry() != null )
         {
             element.addAttribute( "dn", request.getEntry().toString() );
         }
-        
+
         // Assertion
-        Element assertionElement = element.addElement( "assertion");
+        Element assertionElement = element.addElement( "assertion" );
         if ( request.getAttributeDesc() != null )
         {
             assertionElement.addAttribute( "name", request.getAttributeDesc() );
         }
         if ( request.getAssertionValue() != null )
         {
-            assertionElement.addElement( "value").setText( (String) request.getAssertionValue() );
+            assertionElement.addElement( "value" ).setText( ( String ) request.getAssertionValue() );
         }
-        
+
         return element;
     }
+
+
+    /**
+     * Get the entry to be compared
+     * 
+     * @return Returns the entry.
+     */
+    public LdapDN getEntry()
+    {
+        return ( ( CompareRequest ) instance ).getEntry();
+    }
+
+
+    /**
+     * Set the entry to be compared
+     * 
+     * @param entry The entry to set.
+     */
+    public void setEntry( LdapDN entry )
+    {
+        ( ( CompareRequest ) instance ).setEntry( entry );
+    }
+
+
+    /**
+     * Get the assertion value
+     * 
+     * @return Returns the assertionValue.
+     */
+    public Object getAssertionValue()
+    {
+        return ( ( CompareRequest ) instance ).getAssertionValue();
+    }
+
+
+    /**
+     * Set the assertion value
+     * 
+     * @param assertionValue The assertionValue to set.
+     */
+    public void setAssertionValue( Object assertionValue )
+    {
+        ( ( CompareRequest ) instance ).setAssertionValue( assertionValue );
+    }
+
+
+    /**
+     * Get the attribute description
+     * 
+     * @return Returns the attributeDesc.
+     */
+    public String getAttributeDesc()
+    {
+        return ( ( CompareRequest ) instance ).getAttributeDesc();
+    }
+
+
+    /**
+     * Set the attribute description
+     * 
+     * @param attributeDesc The attributeDesc to set.
+     */
+    public void setAttributeDesc( String attributeDesc )
+    {
+        ( ( CompareRequest ) instance ).setAttributeDesc( attributeDesc );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/DelRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,10 +19,12 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
 import org.apache.directory.shared.ldap.codec.del.DelRequest;
+import org.apache.directory.shared.ldap.name.LdapDN;
 import org.dom4j.Element;
 
+
 /**
  * DSML Decorator for DelRequest
  *
@@ -33,16 +35,25 @@
 {
     /**
      * Creates a new instance of DelRequestDsml.
+     */
+    public DelRequestDsml()
+    {
+        super( new DelRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of DelRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public DelRequestDsml( LdapMessage ldapMessage )
+    public DelRequestDsml( DelRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -51,22 +62,44 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         DelRequest request = ( DelRequest ) instance;
-        
+
         // DN
         if ( request.getEntry() != null )
         {
             element.addAttribute( "dn", request.getEntry().toString() );
         }
-        
+
         return element;
     }
+
+
+    /**
+     * Get the entry to be deleted
+     * 
+     * @return Returns the entry.
+     */
+    public LdapDN getEntry()
+    {
+        return ( ( DelRequest ) instance ).getEntry();
+    }
+
+
+    /**
+     * Set the entry to be deleted
+     * 
+     * @param entry The entry to set.
+     */
+    public void setEntry( LdapDN entry )
+    {
+        ( ( DelRequest ) instance ).setEntry( entry );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ExtendedRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ExtendedRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ExtendedRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ExtendedRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,13 +19,15 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
+import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedRequest;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
 import org.dom4j.QName;
 
+
 /**
  * DSML Decorator for ExtendedRequest
  *
@@ -36,16 +38,25 @@
 {
     /**
      * Creates a new instance of ExtendedRequestDsml.
+     */
+    public ExtendedRequestDsml()
+    {
+        super( new ExtendedRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of ExtendedRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ExtendedRequestDsml( LdapMessage ldapMessage )
+    public ExtendedRequestDsml( ExtendedRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -54,22 +65,22 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         ExtendedRequest request = ( ExtendedRequest ) instance;
-        
+
         // Request Name
         if ( request.getRequestName() != null )
         {
             element.addElement( "requestName" ).setText( request.getRequestName() );
         }
-        
+
         // Request Value        
         Namespace xsdNamespace = new Namespace( "xsd", ParserUtils.XML_SCHEMA_URI );
         Namespace xsiNamespace = new Namespace( "xsi", ParserUtils.XML_SCHEMA_INSTANCE_URI );
@@ -78,9 +89,52 @@
 
         Element valueElement = element.addElement( "requestValue" ).addText(
             ParserUtils.base64Encode( request.getRequestValue() ) );
-        valueElement
-            .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
-        
+        valueElement.addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
+
         return element;
     }
+
+
+    /**
+     * Get the extended request name
+     * 
+     * @return Returns the request name.
+     */
+    public String getRequestName()
+    {
+        return ( ( ExtendedRequest ) instance ).getRequestName();
+    }
+
+
+    /**
+     * Set the extended request name
+     * 
+     * @param requestName The request name to set.
+     */
+    public void setRequestName( OID requestName )
+    {
+        ( ( ExtendedRequest ) instance ).setRequestName( requestName );
+    }
+
+
+    /**
+     * Get the extended request value
+     * 
+     * @return Returns the request value.
+     */
+    public byte[] getRequestValue()
+    {
+        return ( ( ExtendedRequest ) instance ).getRequestValue();
+    }
+
+
+    /**
+     * Set the extended request value
+     * 
+     * @param requestValue The request value to set.
+     */
+    public void setRequestValue( byte[] requestValue )
+    {
+        ( ( ExtendedRequest ) instance ).getRequestValue();
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyDNRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,10 +19,13 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequest;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.dom4j.Element;
 
+
 /**
  * DSML Decorator for ModifyDNRequest
  *
@@ -33,16 +36,25 @@
 {
     /**
      * Creates a new instance of ModifyDNRequestDsml.
+     */
+    public ModifyDNRequestDsml()
+    {
+        super( new ModifyDNRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of ModifyDNRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ModifyDNRequestDsml( LdapMessage ldapMessage )
+    public ModifyDNRequestDsml( ModifyDNRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -51,37 +63,125 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         ModifyDNRequest request = ( ModifyDNRequest ) instance;
-        
+
         // DN
         if ( request.getEntry() != null )
         {
             element.addAttribute( "dn", request.getEntry().toString() );
         }
-        
+
         // NewRDN
         if ( request.getNewRDN() != null )
         {
             element.addAttribute( "newrdn", request.getNewRDN().toString() );
         }
-        
+
         // DeleteOldRDN
         element.addAttribute( "deleteoldrdn", ( request.isDeleteOldRDN() ? "true" : "false" ) );
-        
+
         // NewSuperior
         if ( request.getNewRDN() != null )
         {
             element.addAttribute( "newSuperior", request.getNewSuperior().toString() );
         }
-        
+
         return element;
     }
+
+
+    /**
+     * Get the modification's DN
+     * 
+     * @return Returns the entry.
+     */
+    public LdapDN getEntry()
+    {
+        return ( ( ModifyDNRequest ) instance ).getEntry();
+    }
+
+
+    /**
+     * Set the modification DN.
+     * 
+     * @param entry The entry to set.
+     */
+    public void setEntry( LdapDN entry )
+    {
+        ( ( ModifyDNRequest ) instance ).setEntry( entry );
+    }
+
+
+    /**
+     * Tells if the old RDN is to be deleted
+     * 
+     * @return Returns the deleteOldRDN.
+     */
+    public boolean isDeleteOldRDN()
+    {
+        return ( ( ModifyDNRequest ) instance ).isDeleteOldRDN();
+    }
+
+
+    /**
+     * Set the flag to delete the old RDN
+     * 
+     * @param deleteOldRDN The deleteOldRDN to set.
+     */
+    public void setDeleteOldRDN( boolean deleteOldRDN )
+    {
+        ( ( ModifyDNRequest ) instance ).setDeleteOldRDN( deleteOldRDN );
+    }
+
+
+    /**
+     * Get the new RDN
+     * 
+     * @return Returns the newRDN.
+     */
+    public Rdn getNewRDN()
+    {
+        return ( ( ModifyDNRequest ) instance ).getNewRDN();
+    }
+
+
+    /**
+     * Set the new RDN
+     * 
+     * @param newRDN The newRDN to set.
+     */
+    public void setNewRDN( Rdn newRDN )
+    {
+        ( ( ModifyDNRequest ) instance ).setNewRDN( newRDN );
+    }
+
+
+    /**
+     * Get the newSuperior
+     * 
+     * @return Returns the newSuperior.
+     */
+    public LdapDN getNewSuperior()
+    {
+        return ( ( ModifyDNRequest ) instance ).getNewSuperior();
+    }
+
+
+    /**
+     * Set the new superior
+     * 
+     * @param newSuperior The newSuperior to set.
+     */
+    public void setNewSuperior( LdapDN newSuperior )
+    {
+        ( ( ModifyDNRequest ) instance ).setNewSuperior( newSuperior );
+    }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/ModifyRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -19,13 +19,13 @@
  */
 package org.apache.directory.studio.dsmlv2.request;
 
+
 import java.util.List;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.DirContext;
 
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.studio.dsmlv2.ParserUtils;
@@ -33,6 +33,7 @@
 import org.dom4j.Namespace;
 import org.dom4j.QName;
 
+
 /**
  * DSML Decorator for ModifyRequest
  *
@@ -43,16 +44,25 @@
 {
     /**
      * Creates a new instance of ModifyRequestDsml.
+     */
+    public ModifyRequestDsml()
+    {
+        super( new ModifyRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of ModifyRequestDsml.
      *
      * @param ldapMessage
      *      the message to decorate
      */
-    public ModifyRequestDsml( LdapMessage ldapMessage )
+    public ModifyRequestDsml( ModifyRequest ldapMessage )
     {
         super( ldapMessage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -61,41 +71,41 @@
         return instance.getMessageType();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public Element toDsml( Element root )
     {
         Element element = super.toDsml( root );
-        
+
         ModifyRequest request = ( ModifyRequest ) instance;
-        
+
         // DN
         if ( request.getObject() != null )
         {
             element.addAttribute( "dn", request.getObject().toString() );
         }
-        
+
         // Modifications
         List<ModificationItemImpl> modifications = request.getModifications();
-        
+
         for ( int i = 0; i < modifications.size(); i++ )
         {
             ModificationItemImpl modificationItem = modifications.get( i );
-            
+
             Element modElement = element.addElement( "modification" );
             if ( modificationItem.getAttribute() != null )
             {
                 modElement.addAttribute( "name", modificationItem.getAttribute().getID() );
-                
+
                 try
                 {
                     NamingEnumeration ne = modificationItem.getAttribute().getAll();
                     while ( ne.hasMoreElements() )
                     {
                         Object value = ( Object ) ne.nextElement();
-                        
+
                         if ( value != null )
                         {
                             if ( ParserUtils.needsBase64Encoding( value ) )
@@ -105,13 +115,14 @@
                                 element.getDocument().getRootElement().add( xsdNamespace );
                                 element.getDocument().getRootElement().add( xsiNamespace );
 
-                                Element valueElement = modElement.addElement( "value" ).addText( ParserUtils.base64Encode( value ) );
-                                valueElement
-                                    .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
+                                Element valueElement = modElement.addElement( "value" ).addText(
+                                    ParserUtils.base64Encode( value ) );
+                                valueElement.addAttribute( new QName( "type", xsiNamespace ), "xsd:"
+                                    + ParserUtils.BASE64BINARY );
                             }
                             else
                             {
-                                modElement.addElement( "value" ).setText( (String)  value );
+                                modElement.addElement( "value" ).setText( ( String ) value );
                             }
                         }
                     }
@@ -120,7 +131,7 @@
                 {
                 }
             }
-            
+
             int operation = modificationItem.getModificationOp();
             if ( operation == DirContext.ADD_ATTRIBUTE )
             {
@@ -135,7 +146,7 @@
                 modElement.addAttribute( "operation", "delete" );
             }
         }
-        
+
         return element;
     }
 }

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java?rev=679825&r1=679824&r2=679825&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/request/SearchRequestDsml.java Fri Jul 25 07:56:57 2008
@@ -27,7 +27,6 @@
 
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.search.AndFilter;
 import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
@@ -58,7 +57,19 @@
      * @param ldapMessage
      *      the message to decorate
      */
-    public SearchRequestDsml( LdapMessage ldapMessage )
+    public SearchRequestDsml()
+    {
+        super( new SearchRequest() );
+    }
+
+
+    /**
+     * Creates a new instance of SearchRequestDsml.
+     *
+     * @param ldapMessage
+     *      the message to decorate
+     */
+    public SearchRequestDsml( SearchRequest ldapMessage )
     {
         super( ldapMessage );
     }
@@ -144,7 +155,7 @@
         }
 
         // Filter
-        Element filterElement =  element.addElement( "filter" );
+        Element filterElement = element.addElement( "filter" );
         toDsml( filterElement, request.getFilter() );
 
         // Attributes
@@ -186,7 +197,7 @@
                 toDsml( newElement, filterList.get( i ) );
             }
         }
-        
+
         // OR FILTER
         else if ( filter instanceof OrFilter )
         {
@@ -198,7 +209,7 @@
                 toDsml( newElement, filterList.get( i ) );
             }
         }
-        
+
         // NOT FILTER
         else if ( filter instanceof NotFilter )
         {
@@ -206,40 +217,40 @@
 
             toDsml( newElement, ( ( NotFilter ) filter ).getNotFilter() );
         }
-        
+
         // SUBSTRING FILTER
         else if ( filter instanceof SubstringFilter )
         {
             Element newElement = element.addElement( "substrings" );
-            
+
             SubstringFilter substringFilter = ( SubstringFilter ) filter;
-            
-            newElement.addAttribute("name", substringFilter.getType() );
-            
+
+            newElement.addAttribute( "name", substringFilter.getType() );
+
             String initial = substringFilter.getInitialSubstrings();
             if ( ( initial != null ) && ( !"".equals( initial ) ) )
             {
                 newElement.addElement( "initial" ).setText( initial );
             }
-            
+
             List<String> anyList = substringFilter.getAnySubstrings();
             for ( int i = 0; i < anyList.size(); i++ )
             {
                 newElement.addElement( "any" ).setText( anyList.get( i ) );
             }
-            
+
             String finalString = substringFilter.getFinalSubstrings();
             if ( ( finalString != null ) && ( !"".equals( finalString ) ) )
             {
                 newElement.addElement( "final" ).setText( finalString );
             }
         }
-        
+
         // APPROXMATCH, EQUALITYMATCH, GREATEROREQUALS & LESSOREQUAL FILTERS
         else if ( filter instanceof AttributeValueAssertionFilter )
-        {  
+        {
             AttributeValueAssertionFilter avaFilter = ( AttributeValueAssertionFilter ) filter;
-            
+
             Element newElement = null;
             int filterType = avaFilter.getFilterType();
             if ( filterType == LdapConstants.APPROX_MATCH_FILTER )
@@ -258,12 +269,12 @@
             {
                 newElement = element.addElement( "lessOrEqual" );
             }
-            
+
             AttributeValueAssertion assertion = avaFilter.getAssertion();
             if ( assertion != null )
             {
                 newElement.addAttribute( "name", assertion.getAttributeDesc() );
-                
+
                 Object value = assertion.getAssertionValue();
                 if ( value != null )
                 {
@@ -274,34 +285,34 @@
                         element.getDocument().getRootElement().add( xsdNamespace );
                         element.getDocument().getRootElement().add( xsiNamespace );
 
-                        Element valueElement = 
-                            newElement.addElement( "value" ).addText(  ParserUtils.base64Encode( value ) );
+                        Element valueElement = newElement.addElement( "value" ).addText(
+                            ParserUtils.base64Encode( value ) );
                         valueElement
                             .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
                     }
                     else
                     {
-                        newElement.addElement( "value" ).setText( (String)  value );
+                        newElement.addElement( "value" ).setText( ( String ) value );
                     }
                 }
             }
         }
-        
+
         // PRESENT FILTER
         else if ( filter instanceof PresentFilter )
         {
             Element newElement = element.addElement( "present" );
-            
+
             newElement.addAttribute( "name", ( ( PresentFilter ) filter ).getAttributeDescription() );
         }
-        
+
         // EXTENSIBLEMATCH
         else if ( filter instanceof ExtensibleMatchFilter )
         {
             Element newElement = element.addElement( "extensibleMatch" );
-            
+
             ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
-            
+
             Object value = extensibleMatchFilter.getMatchValue();
             if ( value != null )
             {
@@ -312,22 +323,20 @@
                     element.getDocument().getRootElement().add( xsdNamespace );
                     element.getDocument().getRootElement().add( xsiNamespace );
 
-                    Element valueElement = 
-                        newElement.addElement( "value" ).addText(  ParserUtils.base64Encode( value ) );
-                    valueElement
-                        .addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
+                    Element valueElement = newElement.addElement( "value" ).addText( ParserUtils.base64Encode( value ) );
+                    valueElement.addAttribute( new QName( "type", xsiNamespace ), "xsd:" + ParserUtils.BASE64BINARY );
                 }
                 else
                 {
-                    newElement.addElement( "value" ).setText( (String)  value );
+                    newElement.addElement( "value" ).setText( ( String ) value );
                 }
             }
-            
+
             if ( extensibleMatchFilter.isDnAttributes() )
             {
                 newElement.addAttribute( "dnAttributes", "true" );
             }
-            
+
             String matchingRule = extensibleMatchFilter.getMatchingRule();
             if ( ( matchingRule != null ) && ( "".equals( matchingRule ) ) )
             {



Mime
View raw message