public interface ValueFactory
ValueFactory
object provides methods for the creation Value objects that can then be used to set properties.Modifier and Type | Method and Description |
---|---|
Value |
createValue(boolean value)
|
Value |
createValue(java.util.Calendar value)
|
Value |
createValue(double value)
|
Value |
createValue(java.io.InputStream value)
Returns a
Value object of PropertyType.BINARY with a value consisting of the content of the specified InputStream . |
Value |
createValue(long value)
|
Value |
createValue(Node value)
|
Value |
createValue(java.lang.String value)
|
Value |
createValue(java.lang.String value, int type)
|
Value createValue(java.lang.String 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
. A ValueFormatException
is thrown if the specified value
cannot be converted to the specifed type
.value
- a String
type
- one of the constants defined in PropertyType
.Value
of PropertyType
type
.ValueFormatException
- if the specified value
cannot be converted to the specifed type
.Value createValue(long value)
value
- a long
Value
of PropertyType.LONG
Value createValue(double value)
value
- a double
Value
of PropertyType.DOUBLE
Value createValue(boolean value)
value
- a boolean
Value
of PropertyType.BOOLEAN
Value createValue(java.util.Calendar value)
value
- a Calendar
Value
of PropertyType.DATE
Value createValue(java.io.InputStream value)
Value
object of PropertyType.BINARY
with a value consisting of the content of the specified InputStream
.value
- an InputStream
Value
of PropertyType.BINARY
Value createValue(Node value) throws RepositoryException
Value
object of PropertyType.REFERENCE
that holds the UUID of the specified Node
. This Value
object can then be used to set a property that will be a reference to that Node
.
A RepositoryException
is thrown if the specified Node
is not referencable, the current Session
is no longer active, or another error occurs.
value
- a Node
Value
of PropertyType.REFERENCE
RepositoryException
- if the specified Node
is not referencable, the current Session
is no longer active, or another error occurs.Copyright © 2004-2005 Day Software Management AG. All Rights Reserved.