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.
@Deprecated public class SerialValueFactory extends Object implements ValueFactory
Modifier | Constructor and Description |
---|---|
protected |
SerialValueFactory()
Deprecated.
Default constructor only visible to extensions of this class.
|
Modifier and Type | Method and Description |
---|---|
Binary |
createBinary(InputStream stream)
Deprecated.
|
Value |
createValue(BigDecimal value)
Deprecated.
|
Value |
createValue(Binary value)
Deprecated.
|
Value |
createValue(boolean value)
Deprecated.
|
Value |
createValue(Calendar value)
Deprecated.
|
Value |
createValue(double value)
Deprecated.
|
Value |
createValue(InputStream value)
Deprecated.
|
Value |
createValue(long value)
Deprecated.
|
Value |
createValue(Node value)
Deprecated.
|
Value |
createValue(Node value,
boolean weak)
Deprecated.
|
Value |
createValue(String value)
Deprecated.
|
Value |
createValue(String value,
int type)
Deprecated.
|
static SerialValueFactory |
getInstance()
Deprecated.
Returns the
ValueFactory instance, which currently is a
singleton instance of this class. |
static Value |
makeSerialValue(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.
|
protected SerialValueFactory()
public static final SerialValueFactory getInstance()
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.
public static Value[] makeSerialValueArray(Value[] values) throws RepositoryException
If the given array is null
, then an empty array is
returned.
values
- the values to be decoratedRepositoryException
- if the values can not be serializedpublic static Value makeSerialValue(Value value) throws RepositoryException
value
- the value to be decorated, or null
null
RepositoryException
- if the value can not be serializedpublic static Value[] makeSerialValueArray(String[] values)
If the given array is null
, then an empty array is
returned.
values
- the string arraypublic Value createValue(String value)
createValue
in interface ValueFactory
public final Value createValue(String value, int type) throws ValueFormatException
createValue
in interface ValueFactory
ValueFormatException
public final Value createValue(long value)
createValue
in interface ValueFactory
public final Value createValue(double value)
createValue
in interface ValueFactory
public final Value createValue(boolean value)
createValue
in interface ValueFactory
public Value createValue(BigDecimal value)
createValue
in interface ValueFactory
public final Value createValue(Calendar value)
createValue
in interface ValueFactory
public final Value createValue(InputStream value)
createValue
in interface ValueFactory
public final Value createValue(Node value) throws RepositoryException
createValue
in interface ValueFactory
RepositoryException
public Binary createBinary(InputStream stream) throws RepositoryException
createBinary
in interface ValueFactory
RepositoryException
public Value createValue(Binary value)
createValue
in interface ValueFactory
public Value createValue(Node value, boolean weak) throws RepositoryException
createValue
in interface ValueFactory
RepositoryException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.