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 a Value around a PropertyState.
  • Field Details

    • DEFAULT_BLOB_ACCESS_PROVIDER

      @NotNull public static final @NotNull BlobAccessProvider DEFAULT_BLOB_ACCESS_PROVIDER
      This default blob access provider is a no-op implementation.
  • Constructor Details

    • PartialValueFactory

      public PartialValueFactory(@NotNull @NotNull NamePathMapper namePathMapper)
      Creates a new value factory stub using the given NamePathMapper. The factory instance created with this constructor does not have a BlobAccessProvider and any Binary retrieved from a Value 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 given NamePathMapper and BlobAccessProvider.
      Parameters:
      namePathMapper - the name path mapper.
      blobAccessProvider - the blob access provider.
  • Method Details

    • getNamePathMapper

      @NotNull public @NotNull NamePathMapper getNamePathMapper()
      Returns:
      the NamePathMapper used by this value factory.
    • createValue

      @NotNull public @NotNull Value createValue(@NotNull @NotNull PropertyState property)
      Utility method for creating a Value based on a PropertyState.
      Parameters:
      property - The property state
      Returns:
      New Value instance
      Throws:
      IllegalArgumentException - if property.isArray() is true.
    • createValues

      @NotNull public @NotNull List<Value> createValues(@NotNull @NotNull PropertyState property)
      Utility method for creating Values based on a PropertyState.
      Parameters:
      property - The property state
      Returns:
      A list of new Value instances
    • createValue

      @NotNull public @NotNull Value createValue(@NotNull @NotNull 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 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 BigDecimal value)
    • createValue

      @NotNull public @NotNull Value createValue(String value, int type) throws ValueFormatException
      Throws:
      ValueFormatException