Package javax.jcr

Interface ValueFactory

    • Method Detail

      • createValue

        Value createValue​(java.util.Calendar value)
        Returns a Value object of PropertyType.DATE with the specified value.
        Parameters:
        value - a Calendar
        Returns:
        a Value of PropertyType.DATE
        Throws:
        java.lang.IllegalArgumentException - if the specified value cannot be expressed in the ISO 8601-based format defined in the JCR 2.0 specification and the implementation does not support dates incompatible with that format.
      • createValue

        Value createValue​(java.io.InputStream value)
        Deprecated.
        As of JCR 2.0, createValue(Binary) should be used instead.
        Returns a Value object of PropertyType.BINARY with a value consisting of the content of the specified InputStream.

        The passed InputStream is closed before this method returns either normally or because of an exception.

        Parameters:
        value - an InputStream
        Returns:
        a Value of PropertyType.BINARY
      • createValue

        Value createValue​(Binary value)
        Returns a Value object of PropertyType.BINARY with a value consisting of the content of the specified Binary.
        Parameters:
        value - a Binary
        Returns:
        a Value of PropertyType.BINARY
        Since:
        JCR 2.0
      • createValue

        Value createValue​(Node value)
                   throws RepositoryException
        Returns a Value object of PropertyType.REFERENCE that holds the identifier of the specified Node. This Value object can then be used to set a property that will be a reference to that Node.
        Parameters:
        value - a Node
        Returns:
        a Value of PropertyType.REFERENCE
        Throws:
        RepositoryException - if the specified Node is not referenceable, the current Session is no longer active, or another error occurs.
      • createBinary

        Binary createBinary​(java.io.InputStream stream)
                     throws RepositoryException
        Returns a Binary object with a value consisting of the content of the specified InputStream.

        The passed InputStream is closed before this method returns either normally or because of an exception.

        Parameters:
        stream - an InputStream
        Returns:
        a Binary
        Throws:
        RepositoryException - if an error occurs.
        Since:
        JCR 2.0