Class PartialValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.value.jcr.PartialValueFactory
-
- Direct Known Subclasses:
ValueFactoryImpl
public class PartialValueFactory extends java.lang.Object
A partial value factory implementation that only deals with in-memory values and can wrap aValue
around aPropertyState
.
-
-
Field Summary
Fields Modifier and Type Field Description static @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider
DEFAULT_BLOB_ACCESS_PROVIDER
This default blob access provider is a no-op implementation.
-
Constructor Summary
Constructors Constructor Description PartialValueFactory(@NotNull NamePathMapper namePathMapper)
Creates a new value factory stub using the givenNamePathMapper
.PartialValueFactory(@NotNull NamePathMapper namePathMapper, @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider)
Creates a new value factory stub using the givenNamePathMapper
andBlobAccessProvider
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Value
createValue(boolean value)
@NotNull Value
createValue(double value)
@NotNull Value
createValue(long value)
@NotNull Value
createValue(@NotNull java.lang.String value)
@NotNull Value
createValue(@NotNull java.math.BigDecimal value)
@NotNull Value
createValue(@NotNull java.util.Calendar value)
@NotNull Value
createValue(@NotNull Node value)
@NotNull Value
createValue(@NotNull Node value, boolean weak)
@NotNull Value
createValue(@NotNull PropertyState property)
Utility method for creating aValue
based on aPropertyState
.@NotNull Value
createValue(java.lang.String value, int type)
@NotNull java.util.List<Value>
createValues(@NotNull PropertyState property)
Utility method for creatingValue
s based on aPropertyState
.@NotNull NamePathMapper
getNamePathMapper()
-
-
-
Constructor Detail
-
PartialValueFactory
public PartialValueFactory(@NotNull @NotNull NamePathMapper namePathMapper)
Creates a new value factory stub using the givenNamePathMapper
. The factory instance created with this constructor does not have aBlobAccessProvider
and anyBinary
retrieved from aValue
returned by this factory instance will not provide a download URI.- Parameters:
namePathMapper
- the name path mapper.
-
PartialValueFactory
public PartialValueFactory(@NotNull @NotNull NamePathMapper namePathMapper, @NotNull @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider)
Creates a new value factory stub using the givenNamePathMapper
andBlobAccessProvider
.- Parameters:
namePathMapper
- the name path mapper.blobAccessProvider
- the blob access provider.
-
-
Method Detail
-
getNamePathMapper
@NotNull public @NotNull NamePathMapper getNamePathMapper()
- Returns:
- the
NamePathMapper
used by this value factory.
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull PropertyState property)
Utility method for creating aValue
based on aPropertyState
.- Parameters:
property
- The property state- Returns:
- New
Value
instance - Throws:
java.lang.IllegalArgumentException
- ifproperty.isArray()
istrue
.
-
createValues
@NotNull public @NotNull java.util.List<Value> createValues(@NotNull @NotNull PropertyState property)
Utility method for creatingValue
s based on aPropertyState
.- Parameters:
property
- The property state- Returns:
- A list of new
Value
instances
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull java.lang.String value)
-
createValue
@NotNull public @NotNull Value createValue(long value)
-
createValue
@NotNull public @NotNull Value createValue(double value)
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull java.util.Calendar value)
-
createValue
@NotNull public @NotNull Value createValue(boolean value)
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull Node value) throws RepositoryException
- Throws:
RepositoryException
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull Node value, boolean weak) throws RepositoryException
- Throws:
RepositoryException
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull java.math.BigDecimal value)
-
createValue
@NotNull public @NotNull Value createValue(java.lang.String value, int type) throws ValueFormatException
- Throws:
ValueFormatException
-
-