Class PartialValueFactory
java.lang.Object
org.apache.jackrabbit.oak.plugins.value.jcr.PartialValueFactory
- Direct Known Subclasses:
ValueFactoryImpl
A partial value factory implementation that only deals with in-memory values
and can wrap a
Value
around a PropertyState
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final @NotNull BlobAccessProvider
This default blob access provider is a no-op implementation. -
Constructor Summary
ConstructorsConstructorDescriptionPartialValueFactory
(@NotNull NamePathMapper namePathMapper) Creates a new value factory stub using the givenNamePathMapper
.PartialValueFactory
(@NotNull NamePathMapper namePathMapper, @NotNull BlobAccessProvider blobAccessProvider) Creates a new value factory stub using the givenNamePathMapper
andBlobAccessProvider
. -
Method Summary
Modifier and TypeMethodDescription@NotNull Value
createValue
(boolean value) @NotNull Value
createValue
(double value) @NotNull Value
createValue
(long value) @NotNull Value
createValue
(@NotNull String value) @NotNull Value
createValue
(@NotNull BigDecimal value) @NotNull Value
createValue
(@NotNull 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
(String value, int type) createValues
(@NotNull PropertyState property) Utility method for creatingValue
s based on aPropertyState
.@NotNull NamePathMapper
-
Field Details
-
DEFAULT_BLOB_ACCESS_PROVIDER
This default blob access provider is a no-op implementation.
-
-
Constructor Details
-
PartialValueFactory
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 BlobAccessProvider blobAccessProvider) Creates a new value factory stub using the givenNamePathMapper
andBlobAccessProvider
.- Parameters:
namePathMapper
- the name path mapper.blobAccessProvider
- the blob access provider.
-
-
Method Details
-
getNamePathMapper
- Returns:
- the
NamePathMapper
used by this value factory.
-
createValue
Utility method for creating aValue
based on aPropertyState
.- Parameters:
property
- The property state- Returns:
- New
Value
instance - Throws:
IllegalArgumentException
- ifproperty.isArray()
istrue
.
-
createValues
Utility method for creatingValue
s based on aPropertyState
.- Parameters:
property
- The property state- Returns:
- A list of new
Value
instances
-
createValue
-
createValue
-
createValue
-
createValue
-
createValue
-
createValue
- Throws:
RepositoryException
-
createValue
@NotNull public @NotNull Value createValue(@NotNull @NotNull Node value, boolean weak) throws RepositoryException - Throws:
RepositoryException
-
createValue
-
createValue
- Throws:
ValueFormatException
-