jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r553407 - /jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java
Date Thu, 05 Jul 2007 07:31:20 GMT
Author: mreutegg
Date: Thu Jul  5 00:31:19 2007
New Revision: 553407

URL: http://svn.apache.org/viewvc?view=rev&rev=553407
Log:
JCR-1003: Use inheritance rather than delegation for SPI ValueFactoryImpl

Modified:
    jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java

Modified: jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java?view=diff&rev=553407&r1=553406&r2=553407
==============================================================================
--- jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java
(original)
+++ jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFactoryImplEx.java
Thu Jul  5 00:31:19 2007
@@ -22,22 +22,16 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.ValueFormatException;
 import javax.jcr.PropertyType;
-import java.util.Calendar;
-import java.io.InputStream;
 
 /**
- * <code>ValueFactoryImplEx</code>...
+ * <code>ValueFactoryImplEx</code> extends the implementation from the
+ * jcr-commons module and allows a less restricted UUID format.
  */
-public class ValueFactoryImplEx implements ValueFactory {
+public class ValueFactoryImplEx extends ValueFactoryImpl {
 
     private static final ValueFactory INSTANCE = new ValueFactoryImplEx();
 
     /**
-     * Delegatee for all calls except for REFERENCE values.
-     */
-    private final ValueFactory commonsFactory = ValueFactoryImpl.getInstance();
-
-    /**
      * Constructs a <code>ValueFactory</code> object.
      */
     private ValueFactoryImplEx() {
@@ -51,10 +45,6 @@
         return new ReferenceValue(value);
     }
 
-    public Value createValue(String string) {
-        return commonsFactory.createValue(string);
-    }
-
     public Value createValue(String value, int type) throws ValueFormatException {
         Value val;
         switch (type) {
@@ -62,29 +52,9 @@
                 val = ReferenceValue.valueOf(value);
                 break;
             default:
-                val = commonsFactory.createValue(value, type);
+                val = super.createValue(value, type);
         }
         return val;
-    }
-
-    public Value createValue(long l) {
-        return commonsFactory.createValue(l);
-    }
-
-    public Value createValue(double v) {
-        return commonsFactory.createValue(v);
-    }
-
-    public Value createValue(boolean b) {
-        return commonsFactory.createValue(b);
-    }
-
-    public Value createValue(Calendar calendar) {
-        return commonsFactory.createValue(calendar);
-    }
-
-    public Value createValue(InputStream inputStream) {
-        return commonsFactory.createValue(inputStream);
     }
 
     /**



Mime
View raw message