Show TOC Start of Content Area

Background documentation Attachment Attributes  Locate the document in its SAP Library structure

The attachments that you add to your processes at Guided Procedures (GP) design time and runtime have a set of attributes, which you can access using the GP API.

An attachment is always associated with the following attributes:

      ID – a unique identifier of the attachment, generated depending on the particular implementation of the attachment list

      Display name – the visible name

      Original file name – the name of the file attached

      Type handler

A number of attachment handlers are available within the GP framework:

       File (TYPE_FILE)

       URL (TYPE_URL)

       User management handler (TYPE_USER)

Currently, you cannot register any additional handlers.

      Creator – the ID of the person who created the attachment

This is the unique ID, returned by the User Management Engine (UME), which helps the GP framework to recognize and visualize the user.

      Date of creation

      Row byte content – the content of the file in bytes

      A flag indicating if it is a runtime attachment

You can access these attributes with the following methods:

 

public String getId();

public String getDisplayname();

public String getOriginalFileName();

public String getHandler();

public String getCreator();

public Date getCreated();

public byte[] getContent() throws GPEngineException;

public boolean isRuntime();

 

The information that can be used to visualize an attachment is stored in the GPAttachmentInfo class.

Example

import com.sap.caf.eu.gp.attachment.api.IGPAttachmentSourceHandler;

 

GPAttachmentInfo info = IGPAttachmentSourceHandler.resolveAttachmentInfo(attachment, locale);

 

The available attributes of the GPAttachmentInfo are:

      Display name

      Tooltip text

      Date of creation

      Creator

      Icon URL – the URL of the icon used

      Display URL – the URL used to display the attachment

      Display mode

       Download (DISPLAY_MODE_DOWNLOAD) – the attachment is displayed with the download option

       URL (DISPLAY_MODE_URL) – the attachment is displayed by opening an external URL

      Reference to the attachment itself

You can access the attributes with the following methods:

 

public String getDisplayName();

public String getTooltipText();

public Date getCreationDate();

public String getCreator();

public String getIconUrl();

public String getDisplayUrl();

public int getDisplayMode();

public IGPAttachment getAttachment();

 

 

End of Content Area