|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.services.jcr.rmi.api.value.SerialValueFactory
public class SerialValueFactory
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 rmi.value.StatefullValue
implementation. The methods of the ValueFactory interface are declared final to
guard against breaking the rules.
| Constructor Summary | |
|---|---|
protected |
SerialValueFactory()
Default constructor only visible to extensions of this class. |
| Method Summary | |
|---|---|
protected BinaryValue |
createBinaryValue(java.io.InputStream value)
Creates an instance of the BinaryValue class or an extension thereof. |
protected BinaryValue |
createBinaryValue(java.lang.String value)
Creates an instance of the BinaryValue class or an extension thereof from the string
whose UTF-8 representation is used as the binary data. |
protected BooleanValue |
createBooleanValue(boolean value)
Creates an instance of the BooleanValue class or an extension thereof. |
protected BooleanValue |
createBooleanValue(java.lang.String value)
Creates an instance of the BooleanValue class or an extension thereof from the string
representation of the boolean. |
protected DateValue |
createDateValue(java.util.Calendar value)
Creates an instance of the DateValue class or an extension thereof. |
protected DateValue |
createDateValue(java.lang.String value)
Creates an instance of the DateValue class or an extension thereof from the string
representation of Calendar instance formatted as specified in the JCR
specification. |
protected DoubleValue |
createDoubleValue(double value)
Creates an instance of the DoubleValue class or an extension thereof. |
protected DoubleValue |
createDoubleValue(java.lang.String value)
Creates an instance of the DoubleValue class or an extension thereof from the string
representation of the double number. |
protected LongValue |
createLongValue(long value)
Creates an instance of the LongValue class or an extension thereof. |
protected LongValue |
createLongValue(java.lang.String value)
Creates an instance of the LongValue class or an extension thereof from the string
representation of the long number. |
protected NameValue |
createNameValue(java.lang.String value)
Creates an instance of the NameValue class or an extension thereof. |
protected PathValue |
createPathValue(java.lang.String value)
Creates an instance of the PathValue class or an extension thereof. |
PermissionValue |
createPermissionValue(java.lang.String string)
|
protected ReferenceValue |
createReferenceValue(java.lang.String value)
Creates an instance of the ReferenceValue class or an extension thereof. |
protected StringValue |
createStringValue(java.lang.String value)
Creates an instance of the StringValue class or an extension thereof. |
javax.jcr.Value |
createValue(boolean value)
|
javax.jcr.Value |
createValue(java.util.Calendar value)
|
javax.jcr.Value |
createValue(double value)
|
javax.jcr.Value |
createValue(java.io.InputStream value)
|
javax.jcr.Value |
createValue(long value)
|
javax.jcr.Value |
createValue(javax.jcr.Node value)
|
javax.jcr.Value |
createValue(java.lang.String value)
|
javax.jcr.Value |
createValue(java.lang.String value,
int type)
|
static SerialValueFactory |
getInstance()
Returns the ValueFactory instance, which currently is a singleton instance of this
class. |
static javax.jcr.Value |
makeSerialValue(javax.jcr.Value value)
Utility method for decorating a value. |
static javax.jcr.Value[] |
makeSerialValueArray(javax.jcr.Value[] values)
Utility method for decorating an array of values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SerialValueFactory()
| Method Detail |
|---|
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 javax.jcr.Value[] makeSerialValueArray(javax.jcr.Value[] values)
If the given array is null, then an empty array is returned.
values - the values to be decorated
public static javax.jcr.Value makeSerialValue(javax.jcr.Value value)
value - the value to be decorated
public final javax.jcr.Value createValue(java.lang.String value)
createValue in interface javax.jcr.ValueFactory
public final javax.jcr.Value createValue(java.lang.String value,
int type)
throws javax.jcr.ValueFormatException
createValue in interface javax.jcr.ValueFactoryjavax.jcr.ValueFormatExceptionpublic final javax.jcr.Value createValue(long value)
createValue in interface javax.jcr.ValueFactorypublic final javax.jcr.Value createValue(double value)
createValue in interface javax.jcr.ValueFactorypublic final javax.jcr.Value createValue(boolean value)
createValue in interface javax.jcr.ValueFactorypublic final javax.jcr.Value createValue(java.util.Calendar value)
createValue in interface javax.jcr.ValueFactorypublic final javax.jcr.Value createValue(java.io.InputStream value)
createValue in interface javax.jcr.ValueFactory
public final javax.jcr.Value createValue(javax.jcr.Node value)
throws javax.jcr.RepositoryException
createValue in interface javax.jcr.ValueFactoryjavax.jcr.RepositoryExceptionprotected StringValue createStringValue(java.lang.String value)
StringValue class or an extension thereof.
This implementation just calls StringValue.StringValue(String) with the string
value.
value - The string making up the value itself.
protected NameValue createNameValue(java.lang.String value)
throws javax.jcr.ValueFormatException
NameValue class or an extension thereof.
This implementation just calls NameValue.NameValue(String) with the string
value.
value - The string making up the value itself.
javax.jcr.ValueFormatException - if the string is not a synthactically correct JCR name.
protected PathValue createPathValue(java.lang.String value)
throws javax.jcr.ValueFormatException
PathValue class or an extension thereof.
This implementation just calls PathValue.PathValue(String) with the string
value.
value - The string making up the value itself.
javax.jcr.ValueFormatException - if the string is not a synthactically correct JCR path.
protected ReferenceValue createReferenceValue(java.lang.String value)
throws javax.jcr.ValueFormatException
ReferenceValue class or an extension thereof.
This implementation just calls ReferenceValue.ReferenceValue(String) with the string
value.
value - The string making up the value itself.
javax.jcr.ValueFormatException - if the string is not a synthactically correct JCR reference.protected LongValue createLongValue(long value)
LongValue class or an extension thereof.
This implementation just calls LongValue.LongValue(long) with the long
value.
value - The long making up the value itself.
protected LongValue createLongValue(java.lang.String value)
throws javax.jcr.ValueFormatException
LongValue class or an extension thereof from the string
representation of the long number.
This implementation just calls LongValue.LongValue(String) with the string
value.
value - The string representation of the long number making up the value itself.
javax.jcr.ValueFormatException - if the string cannot be converted to a long number.protected DoubleValue createDoubleValue(double value)
DoubleValue class or an extension thereof.
This implementation just calls DoubleValue.DoubleValue(double) with the double
value.
value - The double making up the value itself.
protected DoubleValue createDoubleValue(java.lang.String value)
throws javax.jcr.ValueFormatException
DoubleValue class or an extension thereof from the string
representation of the double number.
This implementation just calls DoubleValue.DoubleValue(String) with the string
value.
value - The string representation of the long number making up the value itself.
javax.jcr.ValueFormatException - if the string cannot be converted to a double number.protected DateValue createDateValue(java.util.Calendar value)
DateValue class or an extension thereof.
This implementation just calls DateValue.DateValue(Calendar) with the
Calendar value.
value - The Calendar making up the value itself.
protected DateValue createDateValue(java.lang.String value)
throws javax.jcr.ValueFormatException
DateValue class or an extension thereof from the string
representation of Calendar instance formatted as specified in the JCR
specification.
This implementation just calls DateValue.DateValue(String) with the string
value.
value - The string representation of the Calendar instance making up the value
itself.
javax.jcr.ValueFormatException - if the string cannot be converted to a Calendar instance.protected BooleanValue createBooleanValue(boolean value)
BooleanValue class or an extension thereof.
This implementation just calls BooleanValue.BooleanValue(boolean) with the boolean
value.
value - The boolean making up the value itself.protected BooleanValue createBooleanValue(java.lang.String value)
BooleanValue class or an extension thereof from the string
representation of the boolean.
This implementation just calls BooleanValue.BooleanValue(String) with the string
value.
value - The string representation of the boolean making up the value itself.
javax.jcr.ValueFormatException - if the string cannot be converted to a long number.protected BinaryValue createBinaryValue(java.io.InputStream value)
BinaryValue class or an extension thereof.
This implementation just calls BinaryValue.BinaryValue(InputStream) with the
InputStream value.
value - The InputStream making up the value itself.
protected BinaryValue createBinaryValue(java.lang.String value)
throws javax.jcr.ValueFormatException
BinaryValue class or an extension thereof from the string
whose UTF-8 representation is used as the binary data.
This implementation just calls BinaryValue.BinaryValue(String) with the string
value.
value - The string whose UTF-8 representation is making up the value itself.
javax.jcr.ValueFormatException - if the UTF-8 representation of the string cannot be created.
public PermissionValue createPermissionValue(java.lang.String string)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||