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 org.apache.jackrabbit.oak.api.blob.BlobAccessProviderThis 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 org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider) Creates a new value factory stub using the givenNamePathMapperandBlobAccessProvider. -
Method Summary
Modifier and TypeMethodDescription@NotNull ValuecreateValue(boolean value) @NotNull ValuecreateValue(double value) @NotNull ValuecreateValue(long value) @NotNull ValuecreateValue(@NotNull String value) @NotNull ValuecreateValue(String value, int type) @NotNull ValuecreateValue(@NotNull BigDecimal value) @NotNull ValuecreateValue(@NotNull 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.createValues(@NotNull PropertyState property) Utility method for creatingValues based on aPropertyState.@NotNull NamePathMapper
-
Field Details
-
DEFAULT_BLOB_ACCESS_PROVIDER
@NotNull public static final @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider DEFAULT_BLOB_ACCESS_PROVIDERThis 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 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 Details
-
getNamePathMapper
- Returns:
- the
NamePathMapperused by this value factory.
-
createValue
Utility method for creating aValuebased on aPropertyState.- Parameters:
property- The property state- Returns:
- New
Valueinstance - Throws:
IllegalArgumentException- ifproperty.isArray()istrue.
-
createValues
Utility method for creatingValues based on aPropertyState.- Parameters:
property- The property state- Returns:
- A list of new
Valueinstances
-
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
-