Class SerialValueFactory

  • All Implemented Interfaces:
    ValueFactory

    @Deprecated(forRemoval=true)
    public class SerialValueFactory
    extends Object
    implements ValueFactory
    Deprecated, for removal: This API element is subject to removal in a future version.
    RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.

    The SerialValueFactory class is used in the RMI infrastructure to create serializable Value instances on the client side.

    This class works in conjunction with the implementations of the javax.jcr.Value interface found in this package.

    This class may be extended to overwrite any of the createXXXValue methods to create instances of the respective type of Value implementation. The methods of the ValueFactory interface are declared final to guard against breaking the rules.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SerialValueFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor only visible to extensions of this class.
    • Constructor Detail

      • SerialValueFactory

        protected SerialValueFactory()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Default constructor only visible to extensions of this class. See class comments for details.
    • Method Detail

      • getInstance

        public static final SerialValueFactory getInstance()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the ValueFactory instance, which currently is a singleton instance of this class.

        Future revisions will support some kind of configuration to specify which concrete class should be used.

      • makeSerialValueArray

        public static Value[] makeSerialValueArray​(Value[] values)
                                            throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for decorating an array of values. The returned array will contain serializable value decorators for all the given values. Note that the contents of the original values will only be copied when the decorators are serialized.

        If the given array is null, then an empty array is returned.

        Parameters:
        values - the values to be decorated
        Returns:
        array of decorated values
        Throws:
        RepositoryException - if the values can not be serialized
      • makeSerialValue

        public static Value makeSerialValue​(Value value)
                                     throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for decorating a value. Note that the contents of the original values will only be copied when the decorators are serialized. Null referenced and already serializable values are passed as-is.
        Parameters:
        value - the value to be decorated, or null
        Returns:
        the decorated value, or null
        Throws:
        RepositoryException - if the value can not be serialized
      • makeSerialValueArray

        public static Value[] makeSerialValueArray​(String[] values)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for converting an array of strings to serializable string values.

        If the given array is null, then an empty array is returned.

        Parameters:
        values - the string array
        Returns:
        array of string values
      • createValue

        public Value createValue​(String value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public final Value createValue​(long value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public final Value createValue​(double value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public final Value createValue​(boolean value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public Value createValue​(BigDecimal value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public final Value createValue​(Calendar value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public final Value createValue​(InputStream value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory
      • createValue

        public Value createValue​(Binary value)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        createValue in interface ValueFactory