|
SAP NetWeaver 7.11 (EhP1 SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.netweaver.bc.uwl.Attachment
public class Attachment
The Attachment class represents two basic types:
URL and file document data.
URL includes any internet url or any link such as object link.
For file document data display, there are mainly 3 scenarios:
text/html.
| Field Summary | |
|---|---|
static int |
TYPE_ACTION
Attachment can also be of type activity, in which case content given from the connector is an Action object. |
static int |
TYPE_ERROR
Denotes an internal error resulted while getting attachment, no information at all except for the attachment title. |
static int |
TYPE_MEMO
Special attachment to indicate memo attached to the item. |
static int |
TYPE_MIME_DATA
Stands for a classic file document attachment with mime type. |
static int |
TYPE_OBJLINK
This one is similar to TYPE_URL, a link reference to be calculated by server. |
static int |
TYPE_OBJNAVIG
Represents object based navigation and client script navigation. |
static int |
TYPE_RAW_DATA
Indicates raw file data without specific mime type. |
static int |
TYPE_TEXT
Content is string, used for notes. |
static int |
TYPE_UNKNOWN_DATA
File data is available but data type is unknown. |
static int |
TYPE_UNSUPPORTED
The type is not supported at all and consequently, file data cannot be retrieved. |
static int |
TYPE_UNSUPPORTED_OLDSYS
Indicates that retrieving document data is not supported in the system at all. |
static int |
TYPE_URL
Represents a simple link, no stream data. |
| Constructor Summary | |
|---|---|
Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID)
This constructor is similar to Attachment(java.lang.String, java.lang.String, int, java.lang.String). |
|
Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID,
String author,
Date timeCreated,
PriorityEnum priority)
This constructor is similar to Attachment(java.lang.String, int, java.lang.String, java.lang.String,
java.lang.String),
with optional additional data: priority, time created and author. |
|
Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID,
String author,
Date timeCreated,
PriorityEnum priority,
String fileName,
String extension,
String mimeType,
int fileSize)
This constructor is chiefly intended for attachment of document type. |
|
Attachment(String attachmentConnectorID,
String internalID,
int type,
String title)
This constructor takes minimal administrative data to create an attachment. |
|
| Method Summary | |
|---|---|
static Attachment |
createForUpload(String title,
String filename,
String fileExtension,
Object content,
int type)
Creates an attachment instance for file uploading scenario. |
String |
getAuthor()
|
String |
getConnectorId()
Returns the ID of the attachment connector. |
Object |
getContent()
|
Date |
getCreatedTime()
|
String |
getDescription()
|
String |
getFileExtension()
|
String |
getFileName()
|
int |
getFileSize()
|
String |
getInternalId()
|
String |
getMimeType()
|
String |
getName()
|
PriorityEnum |
getPriority()
|
String |
getTitle()
Returns the title of the attachment. |
int |
getType()
Returns the type of the attachment. |
String |
getTypeDesc()
Returns the short text of the attachment type. |
boolean |
isMemo()
An Attachment is of memo type if its type is Attachment.TYPE_MEMO or Attachment.TYPE_RAW_DATA or Attachment.TYPE_TEXT |
boolean |
isRequiredReading()
This is used to determine if the attachment should be indicated to the user as required reading. |
void |
setContent(Object content)
The content of attachment is set through this method. |
void |
setFileName(String fileName)
If a physical file exists for an attachment, the file name can be saved. |
void |
setName(String name)
|
void |
setRequiredReading(boolean b)
Indicate to the user if this attachment is required reading. |
void |
setType(int attachmentType)
Sets the attachment type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TYPE_URL
public static final int TYPE_TEXT
public static final int TYPE_MIME_DATA
public static final int TYPE_RAW_DATA
public static final int TYPE_UNKNOWN_DATA
public static final int TYPE_ERROR
public static final int TYPE_OBJLINK
TYPE_URL, a link reference to be calculated by server.
This is a special type for object link display.
public static final int TYPE_OBJNAVIG
public static final int TYPE_UNSUPPORTED
public static final int TYPE_UNSUPPORTED_OLDSYS
public static final int TYPE_MEMO
public static final int TYPE_ACTION
| Constructor Detail |
|---|
public Attachment(String attachmentConnectorID,
String internalID,
int type,
String title)
attachmentConnectorID - Attachment Connector IDinternalID - Unique internal ID of attachment per item (in any format but without the '-' character)type - Attachment typetitle - Title of attachmentAttachment(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)
public Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID)
Attachment(java.lang.String, java.lang.String, int, java.lang.String).
It takes additional optional attribute 'description' for the attachment.
attachmentConnectorID - Attachment Connector IDtype - Attachment typetitle - Title of attachmentdescription - Description of an attachmentinternalID - Unique internal ID of attachment per item (in any format but without the '-' character)Attachment(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Date, com.sap.netweaver.bc.uwl.PriorityEnum)
public Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID,
String author,
Date timeCreated,
PriorityEnum priority)
Attachment(java.lang.String, int, java.lang.String, java.lang.String,
java.lang.String),
with optional additional data: priority, time created and author.
attachmentConnectorID - Attachment Connector IDtype - Attachment typetitle - Title of attachmentdescription - Description of an attachmentinternalID - Unique internal ID of attachment per item (in any format but without the '-' character)author - Creator of the attachmenttimeCreated - Creation time of the attachmentpriority - Priority of the attachmentAttachment(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Date, com.sap.netweaver.bc.uwl.PriorityEnum, java.lang.String, java.lang.String, java.lang.String, int)
public Attachment(String attachmentConnectorID,
int type,
String title,
String description,
String internalID,
String author,
Date timeCreated,
PriorityEnum priority,
String fileName,
String extension,
String mimeType,
int fileSize)
#Attachment(java.lang.String, int, java.lang.String, java.lang.String,
java.lang.String,
java.lang.String, java.util.Date, java.lang.String, java.util.Date, com.sap.netweaver.bc.uwl.PriorityEnum),
with optional additional data about a file document.
attachmentConnectorID - Attachment Connector IDtype - Attachment typetitle - Title of attachmentdescription - Description of an attachmentinternalID - Unique internal ID of attachment per item (in any format but without the '-' character)author - Creator of the attachmenttimeCreated - Creation time of the attachmentpriority - Priority of the attachmentfileName - File name of the attachmentextension - Extension of the file documentmimeType - Mime type of the file documentfileSize - File size in bytes| Method Detail |
|---|
public String getConnectorId()
public int getType()
TYPE_URL or TYPE_TEXT.public void setType(int attachmentType)
attachmentType - the type of the attachment like TYPE_URL or TYPE_TEXT.public String getTypeDesc()
public String getTitle()
public String getAuthor()
public String getDescription()
public Date getCreatedTime()
public PriorityEnum getPriority()
com.sap.netweaver.bc.uwl.PriorityEnum.public String getInternalId()
public int getFileSize()
public String getFileName()
public String getName()
public String getFileExtension()
public String getMimeType()
public final void setFileName(String fileName)
fileName - File name of an attachmentpublic final void setName(String name)
name - name of an attachment
public void setContent(Object content)
throws UWLException
content -
UWLExceptionpublic Object getContent()
public boolean isMemo()
public static Attachment createForUpload(String title,
String filename,
String fileExtension,
Object content,
int type)
throws UWLException
title - Can be null. Filename will be used as title displayfilename - FilenamefileExtension - File extension, if any.content - in ByteArrayStream for file uploadtype - Attachment.TYPE_TEXT or Attachment.TYPE_MIME_DATA or Attachment.TYPE_UNKNOWN_DATA
UWLExceptionpublic boolean isRequiredReading()
public void setRequiredReading(boolean b)
b - - True if it should be read else set to false.
|
SAP NetWeaver 7.11 (EhP1 SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||