Interface UserMessageAttachment

    • Method Detail

      • getDescription

        String getDescription()
        Get the value for Description. (The description of the file) 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.
      • getLink

        String getLink()
        Get the value for Link. (The link to the file) 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.
      • isAttachToNotification

        boolean isAttachToNotification()
        Get the value for AttachToNotification. (Attach to the notification email?)
        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.
      • getAttachmentType

        UserMessageAttachmentType getAttachmentType()
        Get the value for AttachmentType. (The type of the attachment) 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.
      • setDescription

        void setDescription​(String newDescription)
        Set the value for Description. (The description of the file) This value is mandatory.
        Parameters:
        newDescription - the new value for Description. If this is null, then the object cannot be persisted.
        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.
      • setLink

        void setLink​(String newLink)
        Set the value for Link. (The link to the file) This value is mandatory.
        Parameters:
        newLink - the new value for Link. If this is null, then the object cannot be persisted.
        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.
      • setAttachToNotification

        void setAttachToNotification​(boolean newAttachToNotification)
        Set the value for AttachToNotification. (Attach to the notification email?)
        Parameters:
        newAttachToNotification - the new value for AttachToNotification.
        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.
      • setAttachmentType

        void setAttachmentType​(UserMessageAttachmentType newAttachmentType)
        Set the value for AttachmentType. (The type of the attachment) This value is mandatory.
        Parameters:
        newAttachmentType - the new value for AttachmentType. If this is null, then the object cannot be persisted.
        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.
      • getJobFile

        JobFile getJobFile()
                    throws com.redwood.scheduler.api.exception.UserMessageAttachmentException
        Attempts to return the Job File that the attachment.
        Returns:
        The Job File if it exists, or null if the link isn't not of the appropriate type, or cannot be found
        Throws:
        com.redwood.scheduler.api.exception.UserMessageAttachmentException - The user message attachment upload was denied or failed.
      • getDocument

        Document getDocument()
                      throws com.redwood.scheduler.api.exception.UserMessageAttachmentException
        Attempts to return the Document that is the attachment.
        Returns:
        The Document if it exists, or null if the Document cannot be found.
        Throws:
        com.redwood.scheduler.api.exception.UserMessageAttachmentException - The user message attachment upload was denied or failed.
      • setDocument

        void setDocument​(Document document)
        Set the attachment to a Document
        Parameters:
        document - The Document to add as the attachment
      • startUpload

        UserMessageAttachmentUpload startUpload​(Format format)
                                         throws com.redwood.scheduler.api.exception.UserMessageAttachmentException
        Start an upload of an attachment.
        Parameters:
        format - The format of the attachment file
        Returns:
        Return a UserMessageAttachmentUpload object to control the upload process.
        Throws:
        com.redwood.scheduler.api.exception.UserMessageAttachmentException - The user message attachment upload was denied or failed.
      • getUserMessage

        UserMessage getUserMessage()
        Get the UserMessage.
        Returns:
        UserMessage
        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.