Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Author:
  Horia Chiorean

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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