Package org.apache.jackrabbit.rmi.value
Class SerialValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.rmi.value.SerialValueFactory
-
- All Implemented Interfaces:
ValueFactory
@Deprecated public class SerialValueFactory extends Object implements ValueFactory
Deprecated.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.The
SerialValueFactoryclass is used in the RMI infrastructure to create serializableValueinstances on the client side.This class works in conjunction with the implementations of the
javax.jcr.Valueinterface found in this package.This class may be extended to overwrite any of the
createXXXValuemethods to create instances of the respective type ofValueimplementation. The methods of theValueFactoryinterface are declared final to guard against breaking the rules.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSerialValueFactory()Deprecated.Default constructor only visible to extensions of this class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BinarycreateBinary(InputStream stream)Deprecated.ValuecreateValue(boolean value)Deprecated.ValuecreateValue(double value)Deprecated.ValuecreateValue(long value)Deprecated.ValuecreateValue(InputStream value)Deprecated.ValuecreateValue(String value)Deprecated.ValuecreateValue(String value, int type)Deprecated.ValuecreateValue(BigDecimal value)Deprecated.ValuecreateValue(Calendar value)Deprecated.ValuecreateValue(Binary value)Deprecated.ValuecreateValue(Node value)Deprecated.ValuecreateValue(Node value, boolean weak)Deprecated.static SerialValueFactorygetInstance()Deprecated.Returns theValueFactoryinstance, which currently is a singleton instance of this class.static ValuemakeSerialValue(Value value)Deprecated.Utility method for decorating a value.static Value[]makeSerialValueArray(String[] values)Deprecated.Utility method for converting an array of strings to serializable string values.static Value[]makeSerialValueArray(Value[] values)Deprecated.Utility method for decorating an array of values.
-
-
-
Method Detail
-
getInstance
public static final SerialValueFactory getInstance()
Deprecated.Returns theValueFactoryinstance, 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.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.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, ornull- Returns:
- the decorated value, or
null - Throws:
RepositoryException- if the value can not be serialized
-
makeSerialValueArray
public static Value[] makeSerialValueArray(String[] values)
Deprecated.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.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(String value, int type) throws ValueFormatException
Deprecated.- Specified by:
createValuein interfaceValueFactory- Throws:
ValueFormatException
-
createValue
public final Value createValue(long value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(double value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(boolean value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(BigDecimal value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(Calendar value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(InputStream value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public final Value createValue(Node value) throws RepositoryException
Deprecated.- Specified by:
createValuein interfaceValueFactory- Throws:
RepositoryException
-
createBinary
public Binary createBinary(InputStream stream) throws RepositoryException
Deprecated.- Specified by:
createBinaryin interfaceValueFactory- Throws:
RepositoryException
-
createValue
public Value createValue(Binary value)
Deprecated.- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(Node value, boolean weak) throws RepositoryException
Deprecated.- Specified by:
createValuein interfaceValueFactory- Throws:
RepositoryException
-
-