AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Editing Collaboration Discussion Properties Using IDK Remote APIs

To query and modify Collaboration discussion and message properties from a remote application, use the IDiscussion and IMessage interfaces in the IDK.

The IDiscussion and IMessage interfaces allow you to change the subject, description, and body of the message before approving it. These interfaces provide access to the following metadata:
Property Name Description API Access
ID The object ID for the current discussion or message. Read Only
Name The name of the current discussion or message. Read/Write
Subject Messages only. The subject of the current message Read/Write
Description The description for the current discussion or message. Read/Write
Details The URL to the details page for the current discussion or message. Read Only
Created Date The date the current discussion or message.was created (this information might not be available). Read Only
Last-Modified Date The date the current discussion or message.was last updated (this information might not be available). Read Only
Approval Status Messages only. The approval status of the message. Read/Write
Owner ID The user ID of the message owner. Read Only
Moderators Discussions only. The user IDs of the dicussion moderators (if any). Read/Write
Access Level The permissions for the defined roles on the current discussion or message (edit, delete, edit security). You can only change permissions for the folder if the default project security is set to false. Read/Write
Permissions The permissions for the current user on the current discussion or message (post, attach links, create, edit, edit security, delete). Read Only
Discussion Messages only. The discussion that contains the current message. Read Only
Project The parent project that contains the current discussion or message. Read Only
Default Project Security Whether or not default project security should be applied to the discussion or message. If default project security is enabled, you cannot change the security for the folder. Read/Write
To modify discussion or message properties, follow the steps below.
  1. Initiate a PRC session. For details, see Initiating a PRC Session to Use IDK Remote APIs.
  2. Get the Discussion Manager.
  3. Get the discussion or message and modify properties as shown in the code samples below.
    Note: You must call store after making any changes or they will not be persisted.

Java

...

//get the discussion message
IDiscussionManager discussionManager = getDiscussionManager(request, response);
IDiscussion discussionMessage = discussionManager.getDiscussionMessage(messageID);

//update properties
discussionMessage.setName() = "Updated Name";
discussionMessage.setDescription() = "Updated Description";

//approve the message
discussionMessage.setApproved();

//call store to persist your changes
discussionMessage.store();

...

.NET (C#)

...

//get the discussion message
Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionManager discussionManager = GetDiscussionManager(Request, Response);
Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionMessage discussionMessage = discussionManager.GetDiscussionMessage(messageID);

//update properties
discussionMessage.Name = "Updated Name";
discussionMessage.Description = "Updated Description";

//approve the message
discussionMessage.Approved = true;

//call store to persist your changes
discussionMessage.Store();

...

.NET (VB)

...

'get the discussion message
dim discussionManager as Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionManager = GetDiscussionManager(Request, Response)
dim discussion as Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionMessage = discussionManager.GetDiscussionMessage(messageID)

'update properties
discussionMessage.Name = "Updated Name"
discussionMessage.Description = "Updated Description"

'approve the message
discussionMessage.Approved = true

'call store to persist your changes
discussionMessage.Store()

...

  Back to Top      Previous Next