Interface IAttachmentItem

All Known Implementing Classes:
AttachmentItem, JcrAttachmentsProvider.JcrAttachmentItem, LocalTempAttachmentsProvider.TempAttachmentItem, PortalAttachmentItem, TaskJcrAttachmentsProvider.JcrTaskAttachmentItem

public interface IAttachmentItem
This interface describes the contract for items exposed by an IAttachmentsProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the length of the file (number of bytes).
    Returns the MIME type of the file content.
    Returns the URL for downloading the file to a browser.
    org.apache.commons.fileupload.FileItem
    Returns respective implementation of FileItem from this IAttachmentItem
    Returns the name of the attachment item.
    Returns the icon url (may be null)
    Returns the id of the attachment
    Returns the date when the attachment was last modified
    boolean
    Returns whether the attachment is deletable by the current user
    boolean
    Returns whether the attachment is updateable by the current user
  • Method Details

    • getId

      String getId()
      Returns the id of the attachment
    • getContentLength

      long getContentLength()
      Returns the length of the file (number of bytes).
    • getContentType

      String getContentType()
      Returns the MIME type of the file content. http://en.wikipedia.org/wiki/Internet_media_type
    • getFileName

      String getFileName()
      Returns the name of the attachment item.
    • getDownloadLink

      String getDownloadLink()
      Returns the URL for downloading the file to a browser. The URL can be absolute (i.e. http://mysite/att/myfile.txt) or relative to some path in the webapp (i.e. /myappcontext/mycustomdownloadservlet/myfile.txt).
    • getIconUrl

      String getIconUrl()
      Returns the icon url (may be null)
    • getLastModifiedDate

      Date getLastModifiedDate()
      Returns the date when the attachment was last modified
    • isUpdatable

      boolean isUpdatable()
      Returns whether the attachment is updateable by the current user
      Returns:
      true or false
    • isDeletable

      boolean isDeletable()
      Returns whether the attachment is deletable by the current user
      Returns:
      true or false
    • getFileItem

      org.apache.commons.fileupload.FileItem getFileItem() throws IOException
      Returns respective implementation of FileItem from this IAttachmentItem
      Returns:
      implementation of FileItem
      Throws:
      IOException