Package org.apache.jackrabbit.rmi.value
Class SerialValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.rmi.value.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 serializableValue
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 ofValue
implementation. The methods of theValueFactory
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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Binary
createBinary(InputStream stream)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(boolean value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(double value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(long value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(InputStream value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(String value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(String value, int type)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(BigDecimal value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(Calendar value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(Binary value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(Node value)
Deprecated, for removal: This API element is subject to removal in a future version.Value
createValue(Node value, boolean weak)
Deprecated, for removal: This API element is subject to removal in a future version.static SerialValueFactory
getInstance()
Deprecated, for removal: This API element is subject to removal in a future version.Returns theValueFactory
instance, which currently is a singleton instance of this class.static Value
makeSerialValue(Value value)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for decorating a value.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.static Value[]
makeSerialValueArray(Value[] values)
Deprecated, for removal: This API element is subject to removal in a future version.Utility method for decorating an array of values.
-
-
-
Method Detail
-
getInstance
public static final SerialValueFactory getInstance()
Deprecated, for removal: This API element is subject to removal in a future version.Returns theValueFactory
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, ornull
- 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 interfaceValueFactory
-
createValue
public final Value createValue(String value, int type) throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createValue
in interfaceValueFactory
- Throws:
ValueFormatException
-
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 interfaceValueFactory
-
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 interfaceValueFactory
-
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 interfaceValueFactory
-
createValue
public Value createValue(BigDecimal value)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createValue
in interfaceValueFactory
-
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 interfaceValueFactory
-
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 interfaceValueFactory
-
createValue
public final Value createValue(Node value) throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createValue
in interfaceValueFactory
- Throws:
RepositoryException
-
createBinary
public Binary createBinary(InputStream stream) throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createBinary
in interfaceValueFactory
- Throws:
RepositoryException
-
createValue
public Value createValue(Binary value)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(Node value, boolean weak) throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createValue
in interfaceValueFactory
- Throws:
RepositoryException
-
-