org.apache.jackrabbit.value
Class AbstractValueFactory

java.lang.Object
  extended by org.apache.jackrabbit.value.AbstractValueFactory
All Implemented Interfaces:
ValueFactory
Direct Known Subclasses:
ValueFactoryImpl

public abstract class AbstractValueFactory
extends Object
implements ValueFactory

This class implements the ValueFactory interface.

See Also:
Session.getValueFactory()

Constructor Summary
protected AbstractValueFactory()
          Constructs a ValueFactory object.
 
Method Summary
protected abstract  void checkNameFormat(String nameValue)
          Checks the format of the given string representing a name value.
protected abstract  void checkPathFormat(String pathValue)
          Checks the format of the given string representing a path value.
 Binary createBinary(InputStream stream)
          
 Value createValue(BigDecimal value)
          
 Value createValue(Binary value)
          
 Value createValue(boolean value)
          
 Value createValue(Calendar value)
          
 Value createValue(double value)
          
 Value createValue(InputStream value)
          
 Value createValue(long value)
          
 Value createValue(Node value)
          
 Value createValue(Node node, boolean weak)
          
 Value createValue(String value)
          
 Value createValue(String value, int type)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValueFactory

protected AbstractValueFactory()
Constructs a ValueFactory object.

Method Detail

checkPathFormat

protected abstract void checkPathFormat(String pathValue)
                                 throws ValueFormatException
Checks the format of the given string representing a path value. Implementations must assert that the given value is a valid jcr path.

Parameters:
pathValue -
Throws:
ValueFormatException - If the given pathValue isn't a valid jcr path.

checkNameFormat

protected abstract void checkNameFormat(String nameValue)
                                 throws ValueFormatException
Checks the format of the given string representing a name value. Implementations must assert that the given value is a valid jcr name.

Parameters:
nameValue -
Throws:
ValueFormatException - If the given pathValue isn't a valid jcr name.

createValue

public Value createValue(boolean value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(Calendar value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(double value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(InputStream value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(long value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(Node value)
                  throws RepositoryException

Specified by:
createValue in interface ValueFactory
Throws:
RepositoryException

createValue

public Value createValue(String value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(String value,
                         int type)
                  throws ValueFormatException

Specified by:
createValue in interface ValueFactory
Throws:
ValueFormatException

createBinary

public Binary createBinary(InputStream stream)
                    throws RepositoryException

Specified by:
createBinary in interface ValueFactory
Throws:
RepositoryException

createValue

public Value createValue(Binary value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(BigDecimal value)

Specified by:
createValue in interface ValueFactory

createValue

public Value createValue(Node node,
                         boolean weak)
                  throws RepositoryException

Specified by:
createValue in interface ValueFactory
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.