|
Oracle© Collaboration Suite Workspaces Web Services API Reference 10g Release 1 (10.1.2.2) Part No. B28209-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AttachmentsService provides methods to operate on attachments within a workspace.
In a collaborative environment it is useful to attach one collaborative entity with another. For example, a discussion thread can be attached to a file to enable discussion on the file. Multiple entities can be attached to an entity. An entity can be queried for the entities attached to it (target attachments) and the entities to which the given entity is attached (source attachments).
The Axis specific code snippet given below, illustrates how attachments can be added to a given resource item within a workspace.
// Invoke an instance of attachment service locator and get a handle to attachment service. AttachmentsServiceServiceLocator assl = new AttachmentsServiceServiceLocator(); attachmentService = assl.getAttachmentsService(); AttachmentDefinition[] aDefArray = new AttachmentDefinition[1]; AttachmentDefinition aDef1 = new AttachmentDefinition(); aDef1.setDescription("Adding attachments as links"); aDef1.setEntityId(taskUid02); // taskUId02 is the UID of task being attached attachmentService.addAttachments(wspcUid, m_taskUid01,aDefArray); // wspcUid is the UID of workspace in which attachments are to be created and // taskUId01 is the UID of source entity to which the attachments are being added.
Method Summary | |
void |
addAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachmentDefinition[] attDef) Adds an attachment for the specified workspace element. |
AttachedItem[] |
listAllAttachments(java.lang.String wspcUid, java.lang.String itemUid) Lists various attachments for the workspace element specified. |
AttachedItem[] |
listSourceAttachments(java.lang.String wspcUid, java.lang.String itemUid) Lists all the source attachments for the workspace element specified. |
AttachedItem[] |
listTargetAttachments(java.lang.String wspcUid, java.lang.String itemUid) Lists all the target attachments for the workspace element specified. |
void |
removeAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachedItem[] attachments) Removes the attachments for the workspace element specified. |
void |
updateAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachedItem[] attachments) Updates the attachments for the workspace element specified. |
Method Detail |
public void addAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachmentDefinition[] attDef) throws CwWSException
attDef
- - attachment definition representing the attachment properties.itemUid
- - UID representing the workspace element from which the attachment is createdwspcUid
- - UID of the workspace in which the attachment is being created.CwWSException
- - If objects passed are null or invalidpublic AttachedItem[] listAllAttachments(java.lang.String wspcUid, java.lang.String itemUid) throws CwWSException
itemUid
- - Item for which the attachments are to be listed.wspcUid
- - workspace in which the attachments are to be listed.CwWSException
- - If objects passed are null or invalidpublic AttachedItem[] listTargetAttachments(java.lang.String wspcUid, java.lang.String itemUid) throws CwWSException
itemUid
- - Item for which the attachments are to be listed.wspcUid
- - workspace in which the attachments are to be listed.CwWSException
- - If objects passed are null or invalidpublic AttachedItem[] listSourceAttachments(java.lang.String wspcUid, java.lang.String itemUid) throws CwWSException
itemUid
- - Item for which the attachments are to be listed.wspcUid
- - workspace in which the attachments are to be listed.CwWSException
- - If objects passed are null or invalidpublic void removeAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachedItem[] attachments) throws CwWSException
attachments
- - AttachedItem[] - array of beans representing the various attachments for this element, to be removed.itemUid
- - Item for which the attachments are to be removedwspcUid
- - workspace in which the attachments are to be removed.CwWSException
- - If objects passed are null or invalidpublic void updateAttachments(java.lang.String wspcUid, java.lang.String itemUid, AttachedItem[] attachments) throws CwWSException
attachments
- - AttachedItem[] - array of beans representing the various attachments for this element, to be updateditemUid
- - Item for which the attachments are to be updateswspcUid
- - workspace in which the attachments are to be updated.CwWSException
- - If objects passed are null or invalid
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |