com.webmethods.caf.faces.data.attachments
Class LocalTempAttachmentsProvider.TempAttachmentItem

java.lang.Object
  extended by com.webmethods.caf.faces.data.attachments.LocalTempAttachmentsProvider.TempAttachmentItem
All Implemented Interfaces:
IAttachmentItem
Enclosing class:
LocalTempAttachmentsProvider

public static class LocalTempAttachmentsProvider.TempAttachmentItem
extends Object
implements IAttachmentItem


Constructor Summary
LocalTempAttachmentsProvider.TempAttachmentItem(File file)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTempAttachmentsProvider.TempAttachmentItem

public LocalTempAttachmentsProvider.TempAttachmentItem(File file)
Method Detail

getContentLength

public long getContentLength()
Description copied from interface: IAttachmentItem
Returns the length of the file (number of bytes).

Specified by:
getContentLength in interface IAttachmentItem

getContentType

public String getContentType()
Description copied from interface: IAttachmentItem
Returns the MIME type of the file content. http://en.wikipedia.org/wiki/Internet_media_type

Specified by:
getContentType in interface IAttachmentItem

getDownloadLink

public String getDownloadLink()
Description copied from interface: IAttachmentItem
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).

Specified by:
getDownloadLink in interface IAttachmentItem

getFileItem

public FileItem getFileItem()
                     throws IOException
Description copied from interface: IAttachmentItem
Returns respective implementation of FileItem from this IAttachmentItem

Specified by:
getFileItem in interface IAttachmentItem
Returns:
implementation of FileItem
Throws:
IOException

getFileName

public String getFileName()
Description copied from interface: IAttachmentItem
Returns the name of the attachment item.

Specified by:
getFileName in interface IAttachmentItem

getIconUrl

public String getIconUrl()
Description copied from interface: IAttachmentItem
Returns the icon url (may be null)

Specified by:
getIconUrl in interface IAttachmentItem

getId

public String getId()
Description copied from interface: IAttachmentItem
Returns the id of the attachment

Specified by:
getId in interface IAttachmentItem

getLastModifiedDate

public Date getLastModifiedDate()
Description copied from interface: IAttachmentItem
Returns the date when the attachment was last modified

Specified by:
getLastModifiedDate in interface IAttachmentItem

isDeletable

public boolean isDeletable()
Description copied from interface: IAttachmentItem
Returns whether the attachment is deletable by the current user

Specified by:
isDeletable in interface IAttachmentItem
Returns:
true or false

isUpdatable

public boolean isUpdatable()
Description copied from interface: IAttachmentItem
Returns whether the attachment is updateable by the current user

Specified by:
isUpdatable in interface IAttachmentItem
Returns:
true or false