tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry/util AdaptorRegistry.java
Date Sun, 07 Nov 2004 12:52:04 GMT
hlship      2004/11/07 04:52:03

  Modified:    framework/src/java/org/apache/tapestry/valid
                        NumberValidator.java
               framework/src/java/org/apache/tapestry Tapestry.java
                        TapestryStrings.properties
               .        forrest.properties .classpath
               framework/src/java/org/apache/tapestry/util/io
                        DataSqueezerImpl.java
  Removed:     framework/src/test/org/apache/tapestry/junit/utils
                        TestAdaptorRegistry.java
               framework/src/java/org/apache/tapestry/util
                        AdaptorRegistry.java
  Log:
  Move AdaptorRegistry into HiveMind (as AdapterRegistry).
  
  Revision  Changes    Path
  1.3       +5 -4      jakarta-tapestry/framework/src/java/org/apache/tapestry/valid/NumberValidator.java
  
  Index: NumberValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/valid/NumberValidator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumberValidator.java	16 Sep 2004 00:26:26 -0000	1.2
  +++ NumberValidator.java	7 Nov 2004 12:52:03 -0000	1.3
  @@ -22,11 +22,12 @@
   import java.util.Set;
   
   import org.apache.hivemind.ApplicationRuntimeException;
  +import org.apache.hivemind.lib.util.AdapterRegistry;
  +import org.apache.hivemind.lib.util.AdapterRegistryImpl;
   import org.apache.tapestry.IMarkupWriter;
   import org.apache.tapestry.IRequestCycle;
   import org.apache.tapestry.Tapestry;
   import org.apache.tapestry.form.IFormComponent;
  -import org.apache.tapestry.util.AdaptorRegistry;
   
   /**
    *  Simple validation for standard number classes.  This is probably insufficient
  @@ -86,7 +87,7 @@
       private String _numberTooLargeMessage;
       private String _numberRangeMessage;
   
  -    private static AdaptorRegistry _numberAdaptors = new AdaptorRegistry();
  +    private static AdapterRegistry _numberAdaptors = new AdapterRegistryImpl();
   
       public final static int NUMBER_TYPE_INTEGER = 0;
   	public final static int NUMBER_TYPE_REAL = 1;
  @@ -325,7 +326,7 @@
   	 */
       public static NumberAdaptor getAdaptor(Class type)
       {
  -        return (NumberAdaptor) _numberAdaptors.getAdaptor(type);
  +        return (NumberAdaptor) _numberAdaptors.getAdapter(type);
       }
   
       public Object toObject(IFormComponent field, String value) throws ValidatorException
  @@ -672,7 +673,7 @@
   
       public boolean isIntegerNumber()
       {
  -        NumberAdaptor result = (NumberAdaptor) _numberAdaptors.getAdaptor(_valueTypeClass);
  +        NumberAdaptor result = (NumberAdaptor) _numberAdaptors.getAdapter(_valueTypeClass);
           if (result == null)
               return false;
   
  
  
  
  1.8       +8 -7      jakarta-tapestry/framework/src/java/org/apache/tapestry/Tapestry.java
  
  Index: Tapestry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/Tapestry.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Tapestry.java	12 Oct 2004 12:42:34 -0000	1.7
  +++ Tapestry.java	7 Nov 2004 12:52:03 -0000	1.8
  @@ -35,12 +35,13 @@
   import org.apache.hivemind.ApplicationRuntimeException;
   import org.apache.hivemind.Location;
   import org.apache.hivemind.Resource;
  +import org.apache.hivemind.lib.util.AdapterRegistry;
  +import org.apache.hivemind.lib.util.AdapterRegistryImpl;
   import org.apache.tapestry.event.ChangeObserver;
   import org.apache.tapestry.event.ObservedChangeEvent;
   import org.apache.tapestry.request.RequestContext;
   import org.apache.tapestry.resource.ContextResource;
   import org.apache.tapestry.spec.IComponentSpecification;
  -import org.apache.tapestry.util.AdaptorRegistry;
   import org.apache.tapestry.util.StringSplitter;
   
   /**
  @@ -336,13 +337,13 @@
       private static final ThreadLocal _invokedMethodIds = new ThreadLocal();
   
       /**
  -     * A {@link org.apache.tapestry.util.AdaptorRegistry}used to coerce arbitrary objects
to
  +     * A {@link org.apache.hivemind.lib.util.AdapterRegistryImpl}used to coerce arbitrary
objects to
        * boolean values.
        * 
        * @see #evaluateBoolean(Object)
        */
   
  -    private static final AdaptorRegistry _booleanAdaptors = new AdaptorRegistry();
  +    private static final AdapterRegistry _booleanAdaptors = new AdapterRegistryImpl();
   
       private static abstract class BoolAdaptor
       {
  @@ -424,10 +425,10 @@
       }
   
       /**
  -     * {@link AdaptorRegistry}used to extract an {@link Iterator}from an arbitrary object.
  +     * {@link AdapterRegistryImpl}used to extract an {@link Iterator}from an arbitrary
object.
        */
   
  -    private static AdaptorRegistry _iteratorAdaptors = new AdaptorRegistry();
  +    private static AdapterRegistry _iteratorAdaptors = new AdapterRegistryImpl();
   
       private abstract static class IteratorAdaptor
       {
  @@ -715,7 +716,7 @@
               return array.length > 0;
           }
   
  -        BoolAdaptor adaptor = (BoolAdaptor) _booleanAdaptors.getAdaptor(valueClass);
  +        BoolAdaptor adaptor = (BoolAdaptor) _booleanAdaptors.getAdapter(valueClass);
   
           return adaptor.coerce(value);
       }
  @@ -754,7 +755,7 @@
           if (value == null)
               return null;
   
  -        IteratorAdaptor adaptor = (IteratorAdaptor) _iteratorAdaptors.getAdaptor(value.getClass());
  +        IteratorAdaptor adaptor = (IteratorAdaptor) _iteratorAdaptors.getAdapter(value.getClass());
   
           return adaptor.coerce(value);
       }
  
  
  
  1.8       +0 -3      jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties
  
  Index: TapestryStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TapestryStrings.properties	5 Oct 2004 03:25:38 -0000	1.7
  +++ TapestryStrings.properties	7 Nov 2004 12:52:03 -0000	1.8
  @@ -300,9 +300,6 @@
   
   # org.apache.tapestry.util
   
  -AdaptorRegistry.duplicate-registration=A registration for class {0} already exists.
  -AdaptorRegistry.adaptor-not-found=Could not find an adaptor for class {0}.
  -
   JanitorThread.interval-locked=The interval for this janitor thread is locked.
   JanitorThread.illegal-interval=The interval for a janitor thread may not be less than 1
millisecond.
   
  
  
  
  1.5       +8 -1      jakarta-tapestry/forrest.properties
  
  Index: forrest.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/forrest.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- forrest.properties	30 Oct 2004 17:15:42 -0000	1.4
  +++ forrest.properties	7 Nov 2004 12:52:03 -0000	1.5
  @@ -20,4 +20,11 @@
   
   project.bugtracking-url=http://nagoya.apache.org/jira/browse/
   
  -project.configfile=${project.home}/src/documentation/conf/cli.xconf
  \ No newline at end of file
  +project.configfile=${project.home}/src/documentation/conf/cli.xconf
  +
  +# These are temporary, while we isolate our Forrest 0.6 issues
  +
  +project.build-dir=${project.home}/target/forrest
  +project.site-dir=${project.home}/target/docs
  +project.temp-dir=${project.home}/target/forrest
  +project.content-dir=target/forrest-composite
  \ No newline at end of file
  
  
  
  1.60      +1 -1      jakarta-tapestry/.classpath
  
  Index: .classpath
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/.classpath,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- .classpath	2 Nov 2004 22:34:23 -0000	1.59
  +++ .classpath	7 Nov 2004 12:52:03 -0000	1.60
  @@ -24,7 +24,7 @@
   	<classpathentry kind="lib" path="ext-package/lib/servletapi-2.3.jar"/>
   	<classpathentry kind="lib" path="ext-package/lib/jboss-j2ee-3.2.1.jar"/>
   	<classpathentry kind="lib" path="ext-package/lib/jCharts-0.6.0.jar"/>
  -	<classpathentry sourcepath="C:/workspace/jakarta-hivemind/framework/src/java" kind="lib"
path="ext-package/lib/hivemind-1.1-alpha-1.jar"/>
  +	<classpathentry kind="lib" path="ext-package/lib/hivemind-1.1-alpha-1.jar"/>
   	<classpathentry kind="lib" path="ext-package/lib/hivemind-lib-1.1-alpha-1.jar"/>
   	<classpathentry kind="output" path="bin"/>
   </classpath>
  
  
  
  1.3       +4 -3      jakarta-tapestry/framework/src/java/org/apache/tapestry/util/io/DataSqueezerImpl.java
  
  Index: DataSqueezerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/util/io/DataSqueezerImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DataSqueezerImpl.java	16 Sep 2004 00:26:17 -0000	1.2
  +++ DataSqueezerImpl.java	7 Nov 2004 12:52:03 -0000	1.3
  @@ -17,9 +17,10 @@
   import java.io.IOException;
   
   import org.apache.hivemind.ClassResolver;
  +import org.apache.hivemind.lib.util.AdapterRegistry;
  +import org.apache.hivemind.lib.util.AdapterRegistryImpl;
   import org.apache.tapestry.Tapestry;
   import org.apache.tapestry.services.DataSqueezer;
  -import org.apache.tapestry.util.AdaptorRegistry;
   
   /**
    * A class used to convert arbitrary objects to Strings and back. This has
  @@ -51,7 +52,7 @@
        * AdaptorRegistry cache of adaptors.
        */
   
  -    private AdaptorRegistry _adaptors = new AdaptorRegistry();
  +    private AdapterRegistry _adaptors = new AdapterRegistryImpl();
   
       /**
        * Resource resolver used to deserialize classes.
  @@ -162,7 +163,7 @@
           if (data == null)
               return NULL_PREFIX;
   
  -        adaptor = (ISqueezeAdaptor) _adaptors.getAdaptor(data.getClass());
  +        adaptor = (ISqueezeAdaptor) _adaptors.getAdapter(data.getClass());
   
           return adaptor.squeeze(this, data);
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message