Package org.apache.jackrabbit.value
Class AbstractValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.value.AbstractValueFactory
-
- All Implemented Interfaces:
ValueFactory
- Direct Known Subclasses:
SimpleValueFactory
,ValueFactoryImpl
public abstract class AbstractValueFactory extends Object implements ValueFactory
This class implements theValueFactory
interface.- See Also:
Session.getValueFactory()
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractValueFactory()
Constructs aValueFactory
object.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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(boolean value)
Value
createValue(double value)
Value
createValue(long value)
Value
createValue(InputStream value)
Value
createValue(String value)
Value
createValue(String value, int type)
Value
createValue(BigDecimal value)
Value
createValue(Calendar value)
Value
createValue(Binary value)
Value
createValue(Node value)
Value
createValue(Node node, boolean weak)
-
-
-
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 givenpathValue
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 givenpathValue
isn't a valid jcr name.
-
createValue
public Value createValue(boolean value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(Calendar value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(double value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(InputStream value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(long value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(Node value) throws RepositoryException
- Specified by:
createValue
in interfaceValueFactory
- Throws:
RepositoryException
-
createValue
public Value createValue(String value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(String value, int type) throws ValueFormatException
- Specified by:
createValue
in interfaceValueFactory
- Throws:
ValueFormatException
-
createBinary
public Binary createBinary(InputStream stream) throws RepositoryException
- Specified by:
createBinary
in interfaceValueFactory
- Throws:
RepositoryException
-
createValue
public Value createValue(Binary value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(BigDecimal value)
- Specified by:
createValue
in interfaceValueFactory
-
createValue
public Value createValue(Node node, boolean weak) throws RepositoryException
- Specified by:
createValue
in interfaceValueFactory
- Throws:
RepositoryException
-
-