Oracle WebCenter Interaction Web Service Development Guide

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

Creating Oracle WebCenter Collaboration Discussions Using Oracle WebCenter Interaction Development Kit (IDK) Remote APIs

To create Oracle WebCenter Collaboration discussions from a remote application, use the IDiscussionManager interface in the Oracle WebCenter Interaction Development Kit (IDK).

The IDiscussionManager interface allows you to create new discussions in an existing project. To create a new discussion, follow the steps below.
  1. Create a PRC session. For details, see Initiating a PRC Session to Use Oracle WebCenter Interaction Development Kit (IDK) Remote APIs.
  2. Retrieve the project ID (a source project must exist before you can create any Collaboration component objects). For details, see Querying Existing Oracle WebCenter Collaboration Projects Using Oracle WebCenter Interaction Development Kit (IDK) Remote APIs.
  3. Get the Discussion Manager and create a new discussion as shown in the code samples below.
    Note: You must call store after creating a discussion, or it will not be persisted.

Java

...

//create the discussion
IDiscussionManager discussionManager = getDiscussionManager(request, response);
IDiscussion discussion =
discussionManager.createDiscussion(project, name, description);

//call store before asking for the ID
discussion.store();
String url = discussion.getDetailsURL();
int id = discussion.getID();
String detailsUrl = "DiscussionMessage.jsp?" + SESSION_DISCUSSION_KEY + "=" + id;

...

.NET (C#)

...

//get the project ID out of session- this should never be null as it is added in the page load event
Plumtree.Remote.PRC.Collaboration.Project.IProject project = (Plumtree.Remote.PRC.Collaboration.Project.IProject)
Session[SESSION_PROJECT_KEY];

//create the discussion
Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionManager discussionManager = GetDiscussionManager(Request, Response);
Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussion discussion =
discussionManager.CreateDiscussion(project, name, description);

//call store before asking for the id.
discussion.Store();
String url = discussion.DetailsURL;
int id = discussion.ID;
String detailsUrl = "DiscussionMessage.aspx?" + SESSION_DISCUSSION_KEY + "=" + id;

...

.NET (VB)

...

'get the project ID out of session- this should never be Nothing as it is added in the page load event
dim project as Plumtree.Remote.PRC.Collaboration.Project.IProject = CType(Session.Item(SESSION_PROJECT_KEY),Plumtree.Remote.PRC.Collaboration.Project.IProject)

'create the discussion
dim discussionManager as Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussionManager = GetDiscussionManager(Request, Response)
dim discussion as Plumtree.Remote.PRC.Collaboration.Discussion.IDiscussion = discussionManager.CreateDiscussion(proje ct, name, description)

'call store before asking for the id.
discussion.Store()
dim url as String = discussion.DetailsURL
dim id as Integer = discussion.ID
dim detailsUrl as String = "DiscussionMessage.aspx?" & SESSION_DISCUSSION_KEY & "=" & CStr(id )

...

  Back to Top      Previous Next