Class PartialValueFactory

  • Direct Known Subclasses:
    ValueFactoryImpl

    public class PartialValueFactory
    extends java.lang.Object
    A partial value factory implementation that only deals with in-memory values and can wrap a Value around a PropertyState.
    • Field Detail

      • DEFAULT_BLOB_ACCESS_PROVIDER

        @NotNull
        public static final @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider DEFAULT_BLOB_ACCESS_PROVIDER
        This default blob access provider is a no-op implementation.
    • Constructor Detail

      • 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 org.apache.jackrabbit.oak.api.blob.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 Detail

      • 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:
        java.lang.IllegalArgumentException - if property.isArray() is true.
      • createValues

        @NotNull
        public @NotNull java.util.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 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 java.math.BigDecimal value)