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