Class PartialValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.value.jcr.PartialValueFactory
-
- Direct Known Subclasses:
ValueFactoryImpl
public class PartialValueFactory extends java.lang.ObjectA 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 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 givenNamePathMapperandBlobAccessProvider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ValuecreateValue(boolean value)@NotNull ValuecreateValue(double value)@NotNull ValuecreateValue(long value)@NotNull ValuecreateValue(@NotNull java.lang.String value)@NotNull ValuecreateValue(@NotNull java.math.BigDecimal value)@NotNull ValuecreateValue(@NotNull java.util.Calendar value)@NotNull ValuecreateValue(@NotNull Node value)@NotNull ValuecreateValue(@NotNull Node value, boolean weak)@NotNull ValuecreateValue(@NotNull PropertyState property)Utility method for creating aValuebased on aPropertyState.@NotNull ValuecreateValue(java.lang.String value, int type)@NotNull java.util.List<Value>createValues(@NotNull PropertyState property)Utility method for creatingValues based on aPropertyState.@NotNull NamePathMappergetNamePathMapper()
-
-
-
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 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 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 NamePathMapper getNamePathMapper()
- Returns:
- the
NamePathMapperused by this value factory.
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull PropertyState property)
Utility method for creating aValuebased on aPropertyState.- Parameters:
property- The property state- Returns:
- New
Valueinstance - Throws:
java.lang.IllegalArgumentException- ifproperty.isArray()istrue.
-
createValues
@NotNull public @NotNull java.util.List<Value> createValues(@NotNull @NotNull PropertyState property)
Utility method for creatingValues based on aPropertyState.- Parameters:
property- The property state- Returns:
- A list of new
Valueinstances
-
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
-
-