directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067037 - in /directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap: codec/ codec/controls/cascade/ codec/controls/manageDsaIT/ codec/controls/search/entryChange/ codec/controls/search/pagedSearch/ codec/controls...
Date Thu, 03 Feb 2011 23:54:12 GMT
Author: akarasulu
Date: Thu Feb  3 23:54:11 2011
New Revision: 1067037

URL: http://svn.apache.org/viewvc?rev=1067037&view=rev
Log:
renaming decorate() method so it is a newCodecControl() overload

Modified:
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IControlFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ILdapCodecService.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/cascade/CascadeFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/manageDsaIT/ManageDsaITFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/entryChange/EntryChangeFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/persistentSearch/PersistentSearchFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/subentries/SubentriesFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
    directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/DefaultLdapCodecService.java
Thu Feb  3 23:54:11 2011
@@ -172,36 +172,6 @@ public class DefaultLdapCodecService imp
         extReqFactories.put( factory.getRequestOid(), factory );
     }
 
-
-    /**
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("unchecked")
-    public <E> E newCodecControl( Class<? extends ICodecControl<? extends Control>>
clazz )
-    {
-        try
-        {
-            Field f = clazz.getField( "OID" );
-            String oid = ( String ) f.get( null );
-            IControlFactory<?,?> factory = controlFactories.get( oid );
-            return ( E ) factory.newCodecControl();
-        }
-        catch ( IllegalAccessException e )
-        {
-            e.printStackTrace();
-        }
-        catch ( SecurityException e )
-        {
-            e.printStackTrace();
-        }
-        catch ( NoSuchFieldException e )
-        {
-            e.printStackTrace();
-        }
-        
-        return null;
-    }
-
     
     /**
      * {@inheritDoc}
@@ -246,7 +216,7 @@ public class DefaultLdapCodecService imp
                 return new BasicControlDecorator( this, control ); 
             }
             
-            return factory.decorate( control );
+            return factory.newCodecControl( control );
         }
         catch ( SecurityException e )
         {

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IControlFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IControlFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IControlFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/IControlFactory.java
Thu Feb  3 23:54:11 2011
@@ -59,7 +59,7 @@ public interface IControlFactory<C exten
      * @param control The {@link Control} to be decorated.
      * @return The decorator wrapping the Control.
      */
-    D decorate( C control );
+    D newCodecControl( C control );
 
 
     /**

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ILdapCodecService.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ILdapCodecService.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ILdapCodecService.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ILdapCodecService.java
Thu Feb  3 23:54:11 2011
@@ -85,9 +85,6 @@ public interface ILdapCodecService
     ICodecControl<? extends Control> decorate( Control control );
     
     
-    <E> E newCodecControl( Class<? extends ICodecControl<? extends Control>>
clazz );
-    
-    
     /**
      * Creates a new LDAP {@link ProtocolCodecFactory}.
      *

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/cascade/CascadeFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/cascade/CascadeFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/cascade/CascadeFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/cascade/CascadeFactory.java
Thu Feb  3 23:54:11 2011
@@ -70,7 +70,7 @@ public class CascadeFactory implements I
     /**
      * {@inheritDoc}
      */
-    public CascadeDecorator decorate( Cascade control )
+    public CascadeDecorator newCodecControl( Cascade control )
     {
         return new CascadeDecorator( codec, control );
     }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/manageDsaIT/ManageDsaITFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/manageDsaIT/ManageDsaITFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/manageDsaIT/ManageDsaITFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/manageDsaIT/ManageDsaITFactory.java
Thu Feb  3 23:54:11 2011
@@ -70,7 +70,7 @@ public class ManageDsaITFactory implemen
     /**
      * {@inheritDoc}
      */
-    public ManageDsaITDecorator decorate( ManageDsaIT control )
+    public ManageDsaITDecorator newCodecControl( ManageDsaIT control )
     {
         return new ManageDsaITDecorator( codec, control );
     }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/entryChange/EntryChangeFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/entryChange/EntryChangeFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/entryChange/EntryChangeFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/entryChange/EntryChangeFactory.java
Thu Feb  3 23:54:11 2011
@@ -70,7 +70,7 @@ public class EntryChangeFactory implemen
     /**
      * {@inheritDoc}
      */
-    public EntryChangeDecorator decorate( EntryChange control )
+    public EntryChangeDecorator newCodecControl( EntryChange control )
     {
         return new EntryChangeDecorator( codec, control );
     }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/pagedSearch/PagedResultsFactory.java
Thu Feb  3 23:54:11 2011
@@ -70,7 +70,7 @@ public class PagedResultsFactory impleme
     /**
      * {@inheritDoc}
      */
-    public PagedResultsDecorator decorate( PagedResults control )
+    public PagedResultsDecorator newCodecControl( PagedResults control )
     {
         return new PagedResultsDecorator( codec, control );
     }

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/persistentSearch/PersistentSearchFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/persistentSearch/PersistentSearchFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/persistentSearch/PersistentSearchFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/persistentSearch/PersistentSearchFactory.java
Thu Feb  3 23:54:11 2011
@@ -64,7 +64,7 @@ public class PersistentSearchFactory imp
     /**
      * {@inheritDoc}
      */
-    public PersistentSearchDecorator decorate( PersistentSearch control )
+    public PersistentSearchDecorator newCodecControl( PersistentSearch control )
     {
         // protect against double decoration
         if ( control instanceof PersistentSearchDecorator )

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/subentries/SubentriesFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/subentries/SubentriesFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/subentries/SubentriesFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/search/subentries/SubentriesFactory.java
Thu Feb  3 23:54:11 2011
@@ -84,7 +84,7 @@ public class SubentriesFactory implement
      * 
      * {@inheritDoc}
      */
-    public SubentriesDecorator decorate( Subentries control )
+    public SubentriesDecorator newCodecControl( Subentries control )
     {
         if ( ! control.getOid().equals( Subentries.OID ) )
         {

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/ppolicy_impl/PasswordPolicyFactory.java
Thu Feb  3 23:54:11 2011
@@ -72,7 +72,7 @@ public class PasswordPolicyFactory imple
      * 
      * {@inheritDoc}
      */
-    public PasswordPolicyDecorator decorate( PasswordPolicy control )
+    public PasswordPolicyDecorator newCodecControl( PasswordPolicy control )
     {
         PasswordPolicyDecorator decorator = null;
         

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueFactory.java
Thu Feb  3 23:54:11 2011
@@ -68,7 +68,7 @@ public class SyncDoneValueFactory implem
     }
     
 
-    public SyncDoneValueDecorator decorate( SyncDoneValue control )
+    public SyncDoneValueDecorator newCodecControl( SyncDoneValue control )
     {
         SyncDoneValueDecorator decorator = null;
         

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueFactory.java
Thu Feb  3 23:54:11 2011
@@ -68,7 +68,7 @@ public class SyncInfoValueFactory implem
     }
     
 
-    public SyncInfoValueDecorator decorate( SyncInfoValue control )
+    public SyncInfoValueDecorator newCodecControl( SyncInfoValue control )
     {
         SyncInfoValueDecorator decorator = null;
         

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncModifyDnFactory.java
Thu Feb  3 23:54:11 2011
@@ -68,7 +68,7 @@ public class SyncModifyDnFactory impleme
     }
     
 
-    public SyncModifyDnDecorator decorate( SyncModifyDn control )
+    public SyncModifyDnDecorator newCodecControl( SyncModifyDn control )
     {
         SyncModifyDnDecorator decorator = null;
         

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueFactory.java
Thu Feb  3 23:54:11 2011
@@ -68,7 +68,7 @@ public class SyncRequestValueFactory imp
     }
     
 
-    public SyncRequestValueDecorator decorate( SyncRequestValue control )
+    public SyncRequestValueDecorator newCodecControl( SyncRequestValue control )
     {
         SyncRequestValueDecorator decorator = null;
         

Modified: directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java?rev=1067037&r1=1067036&r2=1067037&view=diff
==============================================================================
--- directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
(original)
+++ directory/shared/branches/m1/ldap/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueFactory.java
Thu Feb  3 23:54:11 2011
@@ -67,7 +67,7 @@ public class SyncStateValueFactory imple
     }
     
 
-    public SyncStateValueDecorator decorate( SyncStateValue control )
+    public SyncStateValueDecorator newCodecControl( SyncStateValue control )
     {
         SyncStateValueDecorator decorator = null;
         



Mime
View raw message