|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ValueFactory
The ValueFactory object provides methods for the creation Value
objects that can then be used to set properties.
| Method Summary | |
|---|---|
Binary |
createBinary(java.io.InputStream stream)
Returns a Binary object with a value consisting of the
content of the specified InputStream. |
Value |
createValue(java.math.BigDecimal value)
Returns a Value object of PropertyType.DECIMAL with
the specified value. |
Value |
createValue(Binary value)
Returns a Value object of PropertyType.BINARY
with a value consisting of the content of the specified
Binary. |
Value |
createValue(boolean value)
Returns a Value object of PropertyType.BOOLEAN with
the specified value. |
Value |
createValue(java.util.Calendar value)
Returns a Value object of PropertyType.DATE with the
specified value. |
Value |
createValue(double value)
Returns a Value object of PropertyType.DOUBLE with
the specified value. |
Value |
createValue(java.io.InputStream value)
Deprecated. As of JCR 2.0, createValue(Binary) should be used
instead. |
Value |
createValue(long value)
Returns a Value object of PropertyType.LONG with the
specified value. |
Value |
createValue(Node value)
Returns a Value object of PropertyType.REFERENCE
that holds the identifier of the specified Node. |
Value |
createValue(Node value,
boolean weak)
Returns a Value object of PropertyType.REFERENCE (if
weak is false) or PropertyType.REFERENCE (if weak is true) that
holds the identifier of the specified Node. |
Value |
createValue(java.lang.String value)
Returns a Value object of PropertyType.STRING with
the specified value. |
Value |
createValue(java.lang.String value,
int type)
Returns a Value object of the PropertyType specified
by type with the specified value. |
| Method Detail |
|---|
Value createValue(java.lang.String value)
Value object of PropertyType.STRING with
the specified value.
value - a String
Value of PropertyType.STRING
Value createValue(java.lang.String value,
int type)
throws ValueFormatException
Value object of the PropertyType specified
by type with the specified value.
value - a Stringtype - one of the constants defined in PropertyType.
Value of PropertyType type.
ValueFormatException - if the specified value cannot
be converted to the specified type.Value createValue(long value)
Value object of PropertyType.LONG with the
specified value.
value - a long
Value of PropertyType.LONGValue createValue(double value)
Value object of PropertyType.DOUBLE with
the specified value.
value - a double
Value of PropertyType.DOUBLEValue createValue(java.math.BigDecimal value)
Value object of PropertyType.DECIMAL with
the specified value.
value - a double
Value of PropertyType.DECIMALValue createValue(boolean value)
Value object of PropertyType.BOOLEAN with
the specified value.
value - a boolean
Value of PropertyType.BOOLEANValue createValue(java.util.Calendar value)
Value object of PropertyType.DATE with the
specified value.
value - a Calendar
Value of PropertyType.DATE
java.lang.IllegalArgumentException - if the specified value
cannot be expressed in the ISO 8601-based format defined in the JCR 2.0
specification and the implementation does not support dates incompatible
with that format.Value createValue(java.io.InputStream value)
createValue(Binary) should be used
instead.
Value object of PropertyType.BINARY
with a value consisting of the content of the specified
InputStream.
The passed InputStream is closed before this method returns
either normally or because of an exception.
value - an InputStream
Value of PropertyType.BINARYValue createValue(Binary value)
Value object of PropertyType.BINARY
with a value consisting of the content of the specified
Binary.
value - a Binary
Value of PropertyType.BINARY
Value createValue(Node value)
throws RepositoryException
Value object of PropertyType.REFERENCE
that holds the identifier of the specified Node. This
Value object can then be used to set a property that will be
a reference to that Node.
value - a Node
Value of PropertyType.REFERENCE
RepositoryException - if the specified Node is not
referenceable, the current Session is no longer active, or
another error occurs.
Value createValue(Node value,
boolean weak)
throws RepositoryException
Value object of PropertyType.REFERENCE (if
weak is false) or PropertyType.REFERENCE (if weak is true) that
holds the identifier of the specified Node. This
Value object can then be used to set a property that will be
a reference to that Node.
value - a Nodeweak - a boolean. If true then a PropertyType.WEAKREFERENCE is created, otherwise a PropertyType.REFERENCE is created.
Value of PropertyType.REFERENCE or PropertyType.REFERENCE
RepositoryException - if the specified Node is not
referenceable, the current Session is no longer active, or
another error occurs.
Binary createBinary(java.io.InputStream stream)
throws RepositoryException
Binary object with a value consisting of the
content of the specified InputStream.
The passed InputStream is closed before this method returns
either normally or because of an exception.
stream - an InputStream
Binary
RepositoryException - if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||