ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.api
Interface ValueFactory

All Superinterfaces:
ValueFactory

public interface ValueFactory
extends ValueFactory

Extension of the standard ValueFactory which allows conversion to the jcr Value from additional types.


Method Summary
 Binary createBinary(byte[] value)
          Creates a JCR Binary value from the given byte array.
 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 createValue(Date value)
          Creates a JCR compatible Value from a Date instance.
 
Methods inherited from interface javax.jcr.ValueFactory
createBinary, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue
 

Method Detail

createValue

Value createValue(Date value)
                  throws ValueFormatException
Creates a JCR compatible Value from a Date instance.

Parameters:
value - a non-null date instance
Returns:
a JCR value
Throws:
ValueFormatException - if the given value cannot be converted

createBinary

Binary createBinary(byte[] value)
Creates a JCR Binary value from the given byte array.

Parameters:
value - a non-null byte array
Returns:
a Binary implementation instance

createName

String createName(String localName)
Creates a JCR compliant name string, from the given local name.

Parameters:
localName - a non-null string.
Returns:
a name-compliant string

createName

String createName(String namespaceUri,
                  String localName)
Creates a JCR compliant name string, from the given namespace uri and local name.

Parameters:
namespaceUri - a non-null string.
localName - a non-null string.
Returns:
a name-compliant string

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.