|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.faces.data.attachments.AttachmentItem
com.webmethods.caf.faces.data.attachments.PortalAttachmentItem
public class PortalAttachmentItem
Implementation of com.webmethods.caf.faces.data.attachments.IAttachmentsItem
interface that exposes
a file stored in MWS as an attachment
Nested Class Summary | |
---|---|
protected static class |
PortalAttachmentItem.PortalContentFileItem
Implementation of FileItem from a file stored in MWS |
Field Summary |
---|
Fields inherited from class com.webmethods.caf.faces.data.attachments.AttachmentItem |
---|
fContentLength, fContentType, fDeletable, fDownloadLink, fFileName, fIconUrl, fId, fUpdatable, lastModifiedDate |
Constructor Summary | |
---|---|
PortalAttachmentItem()
Default Constructor |
|
PortalAttachmentItem(String id,
String fileName,
String contentType,
long contentLength,
String downloadLink)
Constructor |
Method Summary | |
---|---|
FileItem |
getFileItem()
Gets the FileItem representation of the attachment. |
String |
getIconUrl()
Returns the icon url (may be null) |
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 com.webmethods.caf.faces.data.attachments.AttachmentItem |
---|
getContentLength, getContentType, getDownloadLink, getFileName, getId, getLastModifiedDate, setContentLength, setContentType, setDeletable, setDownloadLink, setFileName, setIconUrl, setId, setLastModifiedDate, setUpdatable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortalAttachmentItem()
public PortalAttachmentItem(String id, String fileName, String contentType, long contentLength, String downloadLink)
id
- Some unique identifier for the item within it's container. Each item in an attachment provider must have a unique id. The format of the id is up to the implementor. In the simple case, the id could be the same as the fileName.fileName
- The name of the attachment item.contentType
- The MIME type of the file content. http://en.wikipedia.org/wiki/Internet_media_typecontentLength
- The length of the file (number of bytes).downloadLink
- 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).Method Detail |
---|
public String getIconUrl()
IAttachmentItem
getIconUrl
in interface IAttachmentItem
getIconUrl
in class AttachmentItem
public boolean isDeletable()
IAttachmentItem
isDeletable
in interface IAttachmentItem
isDeletable
in class AttachmentItem
public boolean isUpdatable()
IAttachmentItem
isUpdatable
in interface IAttachmentItem
isUpdatable
in class AttachmentItem
public FileItem getFileItem() throws IOException
AttachmentItem
getFileItem
in interface IAttachmentItem
getFileItem
in class AttachmentItem
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |