Interface Document

    • Method Detail

      • getFullPath

        String getFullPath()
        Get the value for FullPath. ( The full path to the document, normalized to allow for convenient database searching. The full path is defined as follows:
        • FullPath ::= Prefix Path Document
        • Prefix ::= "doc:" <Document.Partition.Name> ":"
        • Path ::= ( "/" [ <Application.Partition.Name> "." ] <Application.Name> )*
        • Document ::= "/" <Document.Name> [ "." <Document.Format.Extension> ]
        The Partition ":" after "doc:" is optional if the partition of the document is GLOBAL. ) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDataAsBase64

        @Deprecated
        String getDataAsBase64()
        Deprecated.
        Access to the data should be done through the stream methods

        Get the value for DataAsBase64. (The document data as a base 64 encoded String.)

        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getData

        @Deprecated
        byte[] getData()
        Deprecated.
        Access to the data should be done through the stream methods

        Get the value for Data. (The document data as an array of bytes.)

        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getXmlBodyContent

        String getXmlBodyContent()
        Get the value for XmlBodyContent. (The document data, rendered as XML.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getViewerURL

        String getViewerURL()
        Get the value for ViewerURL. ( Viewer URL of this Document. The URL returned points to the contents of the Document. )
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDataAsBase64

        @Deprecated
        void setDataAsBase64​(String newDataAsBase64)
        Deprecated.
        Access to the data should be done through the stream methods

        Set the value for DataAsBase64. (The document data as a base 64 encoded String.) This value is optional.

        Parameters:
        newDataAsBase64 - the new value for DataAsBase64.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setData

        @Deprecated
        void setData​(byte[] newData)
        Deprecated.
        Access to the data should be done through the stream methods

        Set the value for Data. (The document data as an array of bytes.) This value is optional.

        Parameters:
        newData - the new value for Data.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDataAsString

        String getDataAsString()
        Get the document data as a string in the UTF-8 charset.
        Returns:
        The document data.
      • setDataAsString

        void setDataAsString​(String newData)
        Set the document data as a string using the UTF-8 charset.
        Parameters:
        newData - The new document data as a string in the given charset.
      • getXmlContent

        String getXmlContent()
        The document data, rendered as XML. If (and only if) this document is associated with a HTML format, this attribute treats the document as XHTML and returns rendered XHTML containing the full document.
        Returns:
        The document data.
      • getOutputStream

        OutputStream getOutputStream()
                              throws IOException
        Get an OutputStream to write data to the Document.
        Returns:
        The OutputStream to write data to.
        Throws:
        IOException
      • getFormat

        Format getFormat()
        Get the Format.
        Returns:
        Format
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setFormat

        void setFormat​(Format newFormat)
        Set the value for Format. This value is mandatory.
        Parameters:
        newFormat - is the object to set Format to. The format of the document data If this is null, then the object cannot be persisted.
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.