com.webmethods.caf.faces.data.attachments
Interface IAttachmentItem

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

public interface IAttachmentItem

This interface describes the contract for items exposed by an IAttachmentsProvider


Method Summary
 long getContentLength()
          Returns the length of the file (number of bytes).
 String getContentType()
          Returns the MIME type of the file content.
 String getDownloadLink()
          Returns the URL for downloading the file to a browser.
 FileItem getFileItem()
          Returns respective implementation of FileItem from this IAttachmentItem
 String getFileName()
          Returns the name of the attachment item.
 String getIconUrl()
          Returns the icon url (may be null)
 String getId()
          Returns the id of the attachment
 Date getLastModifiedDate()
          Returns the date when the attachment was last modified
 boolean isDeletable()
          Returns whether the attachment is deletable by the current user
 boolean isUpdatable()
          Returns whether the attachment is updateable by the current user
 

Method Detail

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

FileItem getFileItem()
                     throws IOException
Returns respective implementation of FileItem from this IAttachmentItem

Returns:
implementation of FileItem
Throws:
IOException