public class ValueFactoryImpl extends PartialValueFactory implements JackrabbitValueFactory
ValueFactory interface.DEFAULT_BLOB_ACCESS_PROVIDER| Constructor and Description |
|---|
ValueFactoryImpl(@NotNull Root root,
@NotNull NamePathMapper namePathMapper)
Creates a new instance of
ValueFactory. |
ValueFactoryImpl(@NotNull Root root,
@NotNull NamePathMapper namePathMapper,
@NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider)
Creates a new instance of
ValueFactory. |
| Modifier and Type | Method and Description |
|---|---|
@Nullable Binary |
completeBinaryUpload(@NotNull java.lang.String uploadToken)
Complete the transaction of uploading a binary directly to a storage
location and return a
Binary to set as value for a binary
JCR property. |
@Nullable Binary |
createBinary(Blob blob) |
@NotNull Binary |
createBinary(@NotNull java.io.InputStream stream) |
@NotNull Value |
createValue(@NotNull Binary value) |
@NotNull Value |
createValue(@NotNull java.io.InputStream value) |
static @NotNull Value |
createValue(@NotNull PropertyState property,
@NotNull NamePathMapper namePathMapper)
Deprecated.
use
PartialValueFactory.createValue(PropertyState) instead. |
static @NotNull Value |
createValue(@NotNull PropertyValue property,
@NotNull NamePathMapper namePathMapper)
Deprecated.
use
PartialValueFactory.createValue(PropertyState) instead. |
static @NotNull java.util.List<Value> |
createValues(@NotNull PropertyState property,
@NotNull NamePathMapper namePathMapper)
Deprecated.
use
PartialValueFactory.createValues(PropertyState) instead. |
@Nullable Blob |
getBlob(Binary binary) |
@Nullable BinaryUpload |
initiateBinaryUpload(long maxSize,
int maxParts)
Initiate a transaction to upload a binary directly to a storage
location and return
BinaryUpload instructions for a remote client. |
createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValues, getNamePathMapperequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateValue, createValue, createValue, createValue, createValue, createValue, createValue, createValue, createValuepublic ValueFactoryImpl(@NotNull
@NotNull Root root,
@NotNull
@NotNull NamePathMapper namePathMapper,
@NotNull
@NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider blobAccessProvider)
ValueFactory.root - the root instance for creating binary valuesnamePathMapper - The name/path mapping used for converting JCR names/paths toblobAccessProvider - The blob access provider
the internal representation.public ValueFactoryImpl(@NotNull
@NotNull Root root,
@NotNull
@NotNull NamePathMapper namePathMapper)
ValueFactory. The Values
created by this value factory instance will not be backed by a blob
access provider and never return a download URI for a binary value.root - the root instance for creating binary valuesnamePathMapper - The name/path mapping used for converting JCR names/paths to
the internal representation.@Deprecated @NotNull public static @NotNull Value createValue(@NotNull @NotNull PropertyState property, @NotNull @NotNull NamePathMapper namePathMapper)
PartialValueFactory.createValue(PropertyState) instead.Value based on a
PropertyState. The Value instance created by this factory
method will not be backed with a BlobAccessProvider and the
Binary retrieved from the Value does not provide a
download URI, even if the underlying blob store supports it.property - The property statenamePathMapper - The name/path mapping used for converting JCR
names/paths to the internal representation.Value instancejava.lang.IllegalArgumentException - if property.isArray() is true.@Deprecated @NotNull public static @NotNull Value createValue(@NotNull @NotNull PropertyValue property, @NotNull @NotNull NamePathMapper namePathMapper)
PartialValueFactory.createValue(PropertyState) instead.Value based on a
PropertyValue. The Value instance created by this factory
method will not be backed with a BlobAccessProvider and the
Binary retrieved from the Value does not provide a
download URI, even if the underlying blob store supports it.
Utility method for creating a Value based on a PropertyValue.property - The property valuenamePathMapper - The name/path mapping used for converting JCR names/paths to
the internal representation.Value instancejava.lang.IllegalArgumentException - if property.isArray() is true.@Deprecated @NotNull public static @NotNull java.util.List<Value> createValues(@NotNull @NotNull PropertyState property, @NotNull @NotNull NamePathMapper namePathMapper)
PartialValueFactory.createValues(PropertyState) instead.Values based on a
PropertyState. The Value instances created by this factory
method will not be backed with a BlobAccessProvider and the
Binary retrieved from the Value does not provide a
download URI, even if the underlying blob store supports it.property - The property statenamePathMapper - The name/path mapping used for converting JCR names/paths to
the internal representation.Value instances@NotNull public @NotNull Value createValue(@NotNull @NotNull java.io.InputStream value)
createValue in interface ValueFactory@NotNull public @NotNull Value createValue(@NotNull @NotNull Binary value)
createValue in interface ValueFactory@NotNull public @NotNull Binary createBinary(@NotNull @NotNull java.io.InputStream stream) throws RepositoryException
createBinary in interface ValueFactoryRepositoryException@Nullable public @Nullable BinaryUpload initiateBinaryUpload(long maxSize, int maxParts)
JackrabbitValueFactoryBinaryUpload instructions for a remote client.
Returns null if the feature is not available.
IllegalArgumentException will be thrown if an upload
cannot be supported for the required parameters, or if the parameters are
otherwise invalid. Each service provider has specific limitations.
initiateBinaryUpload in interface JackrabbitValueFactorymaxSize - The exact size of the binary to be uploaded or the
estimated maximum size if the exact size is unknown.
If the estimation was too small, the transaction
should be restarted by invoking this method again
using the correct size.maxParts - The maximum number of upload URIs that the client can
accept, for example due to message size limitations.
A value of -1 indicates no limit.
Upon a successful return, it is ensured that an upload
of maxSize can be completed by splitting the
binary into maxURIs parts, otherwise
IllegalArgumentException will be thrown.BinaryUpload providing the upload instructions,
or null if the implementation does not support the direct
upload feature.@Nullable public @Nullable Binary completeBinaryUpload(@NotNull @NotNull java.lang.String uploadToken) throws RepositoryException
JackrabbitValueFactoryBinary to set as value for a binary
JCR property. The binary is not automatically associated with
any location in the JCR.
The client must provide a valid upload token, obtained from
BinaryUpload.getUploadToken() when this transaction was initialized
using JackrabbitValueFactory.initiateBinaryUpload(long, int).
If the uploadToken is unreadable or invalid,
an IllegalArgumentException will be thrown.
completeBinaryUpload in interface JackrabbitValueFactoryuploadToken - A String identifying the upload transaction.Binary, or null if the
implementation does not support the direct upload feature.RepositoryException - if another error occurs.@Nullable public @Nullable Binary createBinary(Blob blob) throws RepositoryException
RepositoryException@Nullable public @Nullable Blob getBlob(Binary binary) throws RepositoryException
RepositoryExceptionCopyright © 2010 - 2019 Adobe. All Rights Reserved