Class Attachment

java.lang.Object
com.appiancorp.suiteapi.process.Attachment
All Implemented Interfaces:
XMLable, AppianTypeHolder, Serializable

public class Attachment extends Object implements XMLable, AppianTypeHolder
Bean used to represent the Process/Task attachment. This bean is used to communicate between the database and Java.
See Also:
  • Field Details

    • SORT_BY_DATE_ATTACHED

      public static final Integer SORT_BY_DATE_ATTACHED
      Constant representing sorting by Attachment DateAttached field
    • SORT_BY_ATTACHED_BY

      public static final Integer SORT_BY_ATTACHED_BY
      Constant representing sorting by Attachment AttachedBy field
    • SORT_BY_COMMENT

      public static final Integer SORT_BY_COMMENT
      Constant representing sorting by Attachment comment field
    • NO_PERMISSION

      public static final int NO_PERMISSION
      See Also:
    • INVALID_ATTACHMENT

      public static final int INVALID_ATTACHMENT
      See Also:
    • VALID

      public static final int VALID
      See Also:
  • Constructor Details

    • Attachment

      public Attachment()
  • Method Details

    • getAttachedBy

      public String getAttachedBy()
      Returns the username of user creating the attachment.
      Returns:
      username
    • toXML

      public void toXML(StringBuilder buffer_)
      Appends an XML representation of this model to the given buffer.
      Specified by:
      toXML in interface XMLable
      Parameters:
      buffer_ - The buffer on which to append the XML representation.
    • fillInAppianTypes

      public void fillInAppianTypes(AppianTypeCache cache_)
      Description copied from interface: AppianTypeHolder
      If the implementing class references any Appian-typed objects (such as User, Group, Folder), this method should be implemented to put the primary keys of these objects in the given cache. Later, the cache will populate itself with the display strings that correspond to all of its ids, such as "Human Resources" for group 9.
      Specified by:
      fillInAppianTypes in interface AppianTypeHolder
      Parameters:
      cache_ - cache of Appian-typed objects.
    • toXML

      public String toXML()
      converts the process model to xml as a string
      Specified by:
      toXML in interface XMLable
      Returns:
      The XML representation of this object.
    • setAttachedBy

      public void setAttachedBy(String attachedBy_)
      Sets the username of user creating the attachment.
      Parameters:
      attachedBy_ - username to set.
    • getAttachedObject

      public LocalObject getAttachedObject()
      Returns the LocalObject used as attachment.
      Returns:
      LocalObject representing Appian Object.
    • setAttachedObject

      public void setAttachedObject(LocalObject attachedObject_)
      Sets the LocalObject used as attachment.
      Parameters:
      attachedObject_ - LocalObject.
    • getAttachedTo

      public LocalObject getAttachedTo()
      Returns the LocalObject that the attachment is attached to.
      Returns:
      LocalObject representing attachedTo Object.
    • setAttachedTo

      public void setAttachedTo(LocalObject attachedTo_)
      Sets the LocalObject that the attachment is attached.
      Parameters:
      attachedTo_ - attachedTo LocalObject
    • getAttachedToGuiId

      public Long getAttachedToGuiId()
      Returns:
      Returns the attachedToGuiId.
    • setAttachedToGuiId

      public void setAttachedToGuiId(Long attachedToGuiId_)
      Parameters:
      attachedToGuiId_ - The attachedToGuiId to set.
    • getAttachedUrl

      public Attachment.NamedUrl getAttachedUrl()
      Returns the NamedUrl representing an external url attachment.
      Returns:
      NamedUrl Object
    • setAttachedUrl

      public void setAttachedUrl(Attachment.NamedUrl attachedUrl_)
      Sets the NamedUrl Object representing an external url attachment.
      Parameters:
      attachedUrl_ - NamedUrl Object representing an external url.
    • getComment

      public String getComment()
      Returns the comments for the attachment.
      Returns:
      comments.
    • setComment

      public void setComment(String comment_)
      Sets the comments for attachment
      Parameters:
      comment_ - Comments to set.
    • getDateAttached

      public Timestamp getDateAttached()
      Returns the timestamp for attachment creation.
      Returns:
      attachment creation Timestamp
    • setDateAttached

      public void setDateAttached(Timestamp dateAttached_)
      Sets the attachment creation Timestamp.
      Parameters:
      dateAttached_ - Timestamp to set.
    • getId

      public Long getId()
      Returns the Id of attachment
      Returns:
      attachment Id
    • setId

      public void setId(Long id_)
      Sets the attachment Id.
      Parameters:
      id_ - attachment id to set.
    • getPermissions

      public AttachmentPermissions getPermissions()
      Returns the permissions for attachment
      Returns:
      attachment permissions
    • setPermissions

      public void setPermissions(AttachmentPermissions permissions_)
      Sets the attachment permissions
      Parameters:
      permissions_ - attachment permissions to set.
    • getAttachedDocumentSubType

      public String getAttachedDocumentSubType()
      Returns the extension of attached document in case of document attachment.
      Returns:
      document extension
    • setAttachedDocumentSubType

      public void setAttachedDocumentSubType(String attachedDocumentSubType_)
      Sets the extension of document in case of document attachment.
      Parameters:
      attachedDocumentSubType_ - extension of document.
    • getEncodedComment

      public String getEncodedComment()
      Returns a URLEncoded comments in accordance with UTF-8 encoding scheme.
      Returns:
      URLEncoded attachment comments