public interface ValueFactory extends ValueFactory
ValueFactory
which allows conversion to the jcr Value
from additional
types.Modifier and Type | Method and Description |
---|---|
Binary |
createBinary(byte[] value)
Creates a JCR
Binary value from the given byte array. |
Binary |
createBinary(InputStream value,
String hint)
Creates a JCR
Binary value from the given input stream with a hint to the factory (which is
passed to the storage layer) |
String |
createName(String localName)
Creates a JCR compliant name string, from the given local name.
|
String |
createName(String namespaceUri,
String localName)
Creates a JCR compliant name string, from the given namespace uri and local name.
|
Value |
createSimpleReference(Node node)
Returns a
Value object of PropertyType.SIMPLE_REFERENCE that holds the identifier of the specified
Node . |
Value |
createValue(Date value)
|
Value |
createValue(URI value)
|
createBinary, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue
Value createValue(Date value) throws ValueFormatException
value
- a non-null date instanceValueFormatException
- if the given value cannot be convertedValue createValue(URI value) throws ValueFormatException
value
- a non-null URI instanceValueFormatException
- if the given value cannot be convertedBinary createBinary(byte[] value)
Binary
value from the given byte array.value
- a non-null byte arrayBinary createBinary(InputStream value, String hint)
Binary
value from the given input stream with a hint to the factory (which is
passed to the storage layer)value
- a non-null input streamhint
- a hint that the storage layer may use to make persistence decisionsString createName(String localName)
localName
- a non-null string.String createName(String namespaceUri, String localName)
namespaceUri
- a non-null string.localName
- a non-null string.Value createSimpleReference(Node node) throws RepositoryException
Value
object of PropertyType.SIMPLE_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
.node
- a Node
Value
of PropertyType.SIMPLE_REFERENCE
RepositoryException
- if an error occurs.Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.