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 Summary

      Fields 
      Modifier and Type Field Description
      static @NotNull org.apache.jackrabbit.oak.api.blob.BlobAccessProvider DEFAULT_BLOB_ACCESS_PROVIDER
      This default blob access provider is a no-op implementation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull javax.jcr.Value createValue​(boolean value)  
      @NotNull javax.jcr.Value createValue​(double value)  
      @NotNull javax.jcr.Value createValue​(long value)  
      @NotNull javax.jcr.Value createValue​(@NotNull java.lang.String value)  
      @NotNull javax.jcr.Value createValue​(@NotNull java.math.BigDecimal value)  
      @NotNull javax.jcr.Value createValue​(@NotNull java.util.Calendar value)  
      @NotNull javax.jcr.Value createValue​(@NotNull javax.jcr.Node value)  
      @NotNull javax.jcr.Value createValue​(@NotNull javax.jcr.Node value, boolean weak)  
      @NotNull javax.jcr.Value createValue​(@NotNull PropertyState property)
      Utility method for creating a Value based on a PropertyState.
      @NotNull javax.jcr.Value createValue​(java.lang.String value, int type)  
      @NotNull java.util.List<javax.jcr.Value> createValues​(@NotNull PropertyState property)
      Utility method for creating Values based on a PropertyState.
      @NotNull NamePathMapper getNamePathMapper()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 javax.jcr.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<javax.jcr.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 javax.jcr.Value createValue​(@NotNull
                                                    @NotNull java.lang.String value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(long value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(double value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(@NotNull
                                                    @NotNull java.util.Calendar value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(boolean value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(@NotNull
                                                    @NotNull javax.jcr.Node value)
                                             throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(@NotNull
                                                    @NotNull javax.jcr.Node value,
                                                    boolean weak)
                                             throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(@NotNull
                                                    @NotNull java.math.BigDecimal value)
      • createValue

        @NotNull
        public @NotNull javax.jcr.Value createValue​(java.lang.String value,
                                                    int type)
                                             throws javax.jcr.ValueFormatException
        Throws:
        javax.jcr.ValueFormatException