jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r169318 - in /incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value: BooleanValue.java DateValue.java DoubleValue.java LongValue.java NameValue.java PathValue.java ReferenceValue.java StatefullValue.java StringValue.java
Date Mon, 09 May 2005 14:23:35 GMT
Author: jukka
Date: Mon May  9 07:23:33 2005
New Revision: 169318

URL: http://svn.apache.org/viewcvs?rev=169318&view=rev
Log:
JCR-RMI: Converted the StatefullValue interface into a marker interface.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/BooleanValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DateValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DoubleValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/LongValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/NameValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/PathValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/ReferenceValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StatefullValue.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StringValue.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/BooleanValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/BooleanValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/BooleanValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/BooleanValue.java
Mon May  9 07:23:33 2005
@@ -29,7 +29,7 @@
  * 
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public class BooleanValue extends BaseNonStreamValue {
+public class BooleanValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The boolean value */
     private final boolean value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DateValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DateValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DateValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DateValue.java
Mon May  9 07:23:33 2005
@@ -41,7 +41,7 @@
  * 
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public class DateValue extends BaseNonStreamValue {
+public class DateValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The <code>Calendar</code> value */
     private final Calendar value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DoubleValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DoubleValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DoubleValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/DoubleValue.java
Mon May  9 07:23:33 2005
@@ -32,7 +32,7 @@
  * 
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public class DoubleValue extends BaseNonStreamValue {
+public class DoubleValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The double value */
     private final double value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/LongValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/LongValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/LongValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/LongValue.java
Mon May  9 07:23:33 2005
@@ -32,7 +32,7 @@
  * 
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public class LongValue extends BaseNonStreamValue {
+public class LongValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The long value */
     private final long value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/NameValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/NameValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/NameValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/NameValue.java
Mon May  9 07:23:33 2005
@@ -28,7 +28,7 @@
  * @author Felix Meschberger
  * @since 0.16.4.1
  */
-public class NameValue extends BaseNonStreamValue {
+public class NameValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The name value. */
     private final String value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/PathValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/PathValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/PathValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/PathValue.java
Mon May  9 07:23:33 2005
@@ -28,7 +28,7 @@
  * @author Felix Meschberger
  * @since 0.16.4.1
  */
-public class PathValue extends BaseNonStreamValue {
+public class PathValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The path value. */
     private final String value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/ReferenceValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/ReferenceValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/ReferenceValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/ReferenceValue.java
Mon May  9 07:23:33 2005
@@ -29,7 +29,8 @@
  * @author Felix Meschberger
  * @since 0.16.4.1
  */
-public class ReferenceValue extends BaseNonStreamValue {
+public class ReferenceValue extends BaseNonStreamValue
+        implements StatefullValue {
 
     /** The reference value */
     private final String value;

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StatefullValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StatefullValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StatefullValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StatefullValue.java
Mon May  9 07:23:33 2005
@@ -16,96 +16,29 @@
  */
 package org.apache.jackrabbit.value;
 
-import java.io.InputStream;
-import java.util.Calendar;
+import java.io.Serializable;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.ValueFormatException;
+import javax.jcr.Value;
 
 /**
  * The <code>StatefullValue</code> interface defines the API used for the state
  * classes used by the {@link org.apache.jackrabbit.value.SerialValue} class.
  * <p>
- * This interface resembles the JCR Value interface but is only used internally
- * to the State pattern implementation of the
+ * This is a marker interface with two purposes; it separates the value
+ * state classes from the more general value classes, and it forces the
+ * state classes to be serializable. This interface is used only internally
+ * by the State pattern implementation of the
  * {@link org.apache.jackrabbit.value.SerialValue} class.
  * <p>
  * This interface is not intended to be implemented by clients. Rather any of
  * the concrete implementations of this class should be used or overwritten as
  * appropriate.
- * 
+ *
  * @version $Revision$, $Date$
  * @author Felix Meschberger
  * @since 0.16.4.1
- * 
+ *
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public interface StatefullValue {
-
-    /**
-     * Returns access to the underlying value through an
-     * <code>InputStream</code>.
-     * 
-     * @throws ValueFormatException If a conversion of this value to an
-     *      <code>InputStream</code> is not possible.
-     * @throws IllegalStateException if the implementation is not in stream
-     *      providing state.
-     */
-    public InputStream getStream() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the <code>boolean</code> representation of this value.
-     * 
-     * @throws ValueFormatException If a conversion of this value to the
-     *      boolean type is not possible.
-     * @throws IllegalStateException if the implementation is in stream
-     *      providing state.
-     */
-    public boolean getBoolean() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the <code>Calendar</code> representation of this value.
-     * 
-     * @throws ValueFormatException If a conversion of this value to a
-     *      <code>Calendar</code> is not possible.
-     * @throws IllegalStateException if the implementation is in stream
-     *      providing state.
-     */
-    public Calendar getDate() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the <code>double</code> representation of this value.
-     * 
-     * @throws ValueFormatException If a conversion of this value to the
-     *      double type is not possible.
-     * @throws IllegalStateException if the implementation is in stream
-     *      providing state.
-     */
-    public double getDouble() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the <code>long</code> representation of this value.
-     * 
-     * @throws ValueFormatException If a conversion of this value to the
-     *      long type is not possible.
-     * @throws IllegalStateException if the implementation is in stream
-     *      providing state.
-     */
-    public long getLong() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the <code>String</code> representation of this value.
-     * 
-     * @throws ValueFormatException If a conversion of this value to the
-     *      string type is not possible.
-     * @throws IllegalStateException if the implementation is in stream
-     *      providing state.
-     */
-    public String getString() throws ValueFormatException, RepositoryException;
-    
-    /**
-     * Returns the primary type of this value, which is one of the type
-     * codes defined in the <code>javax.jcr.PropertyType</code> interface.
-     */
-    public int getType();
+public interface StatefullValue extends Value, Serializable {
 }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StringValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StringValue.java?rev=169318&r1=169317&r2=169318&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StringValue.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/value/StringValue.java
Mon May  9 07:23:33 2005
@@ -32,7 +32,7 @@
  * 
  * @see org.apache.jackrabbit.value.SerialValue
  */
-public class StringValue extends BaseNonStreamValue {
+public class StringValue extends BaseNonStreamValue implements StatefullValue {
 
     /** The string value */
     private final String value;



Mime
View raw message