Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 1 (11.1.1)
E14128-05

oracle.alm.connector
Interface WorkItemAttachment


public interface WorkItemAttachment

The WorkItemAttachment interface is implemented by a work item connector to support the management of the work item in the work item detail editor window. It provides access to corresponding file system that stores the attachments.

If the call to isAttachmentSupported() by the connector framework returns true, the connector needs to implement this interface.

Each API needs to process the attachment requests based on the session context and the work item currently used.

Since:
11.1.1.1.0

Method Summary
 boolean deleteAttachment(java.util.Map session, WorkItem wi, DocumentItem di)
          Deletes work item attachment
 void downloadAttachment(java.util.Map session, WorkItem wi, DocumentItem di, java.lang.String localPath)
          Downloads work item attachment to the specified location on the local file system
 java.util.List<DocumentItem> getAttachments(java.util.Map session, WorkItem wi)
          Retrieves a list of attachments for a specific work item.
 DocumentItem updateAttachmentAttrs(java.util.Map session, WorkItem wi, DocumentItem oldDI, DocumentItem newDI)
          Changes the attributes of a work item attachment
 DocumentItem uploadAttachment(java.util.Map session, WorkItem wi, DocumentItem di, java.lang.String localPath)
          Uploads a local file to the specified file store, and associates the file as an attachment to the specified work item
 

Method Detail

getAttachments

java.util.List<DocumentItem> getAttachments(java.util.Map session,
                                            WorkItem wi)
                                            throws ALMException
Retrieves a list of attachments for a specific work item.

Parameters:
session - user session context
wi - current work item
Returns:
the list of attachments for current work item if succeeded
Throws:
ALMException - if failed to get the attachments

uploadAttachment

DocumentItem uploadAttachment(java.util.Map session,
                              WorkItem wi,
                              DocumentItem di,
                              java.lang.String localPath)
                              throws ALMException
Uploads a local file to the specified file store, and associates the file as an attachment to the specified work item

Parameters:
session - user session context
wi - current work item
di - attachment information used when storing the file to the server
localPath - the full path of the local file to uplaod
Returns:
the new attachment information saved in the server
Throws:
ALMException - if failed to upload attachment.

downloadAttachment

void downloadAttachment(java.util.Map session,
                        WorkItem wi,
                        DocumentItem di,
                        java.lang.String localPath)
                        throws ALMException
Downloads work item attachment to the specified location on the local file system

Parameters:
session - user session context
wi - current work item
di - attachment information used when downloading the file from the server
localPath - the full path of the local file that the attachment will be stored as
Throws:
ALMException - if failed to download the attachment.

deleteAttachment

boolean deleteAttachment(java.util.Map session,
                         WorkItem wi,
                         DocumentItem di)
                         throws ALMException
Deletes work item attachment

Parameters:
session - user session context
wi - current work item
di - the attachment to be deleted
Returns:
true if succeeded, else false
Throws:
ALMException - if failed to delete attachment.

updateAttachmentAttrs

DocumentItem updateAttachmentAttrs(java.util.Map session,
                                   WorkItem wi,
                                   DocumentItem oldDI,
                                   DocumentItem newDI)
                                   throws ALMException
Changes the attributes of a work item attachment

Parameters:
session - user session context
wi - current work item
oldDI - old attachment information
newDI - new attachment information to update the attributes to
Returns:
updated attachment item
Throws:
ALMException - if failed to update attachment.

Oracle Fusion Middleware Java API Reference for Oracle Team Productivity Center
11g Release 1 (11.1.1)
E14128-05

Copyright © 1999,2010, Oracle. All rights reserved.