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

Managing Collaboration Project Roles Using the IDK Remote API

To assign users to Collaboration project roles from a remote application, use the IRole interface in the IDK.

The project role defines the actions that users are able to perform in a given project. The default Collaboration roles are defined as follows:
  • Project Leaders have Admin control over project objects, which includes Read, Write, and Edit permission for all objects, as well as the ability to set role permissions (access levels) for each object.
  • Project Members have Write access to project objects and can participate in the project. This role can create tasks, add documents, attach links, and check files in and out. The access privileges for this role are configured by the Project Leader.
  • Project Guests have Read access to project objects. This role cannot create objects; it is intended for users who simply want to monitor projects but not participate actively. The access privileges for this role are configured by the Project Leader.
The IRole interface allows you to assign users to each project role. Each instance of IRole applies to a specific role within a specific project. You can assign roles to individual users, or to all the users that fulfill a specific role in a community. Once you have defined roles, you can modify the default access levels for a project, or for an individual object in the project (task list, task, folder, document, or discussion). For a list of access levels for Collaboration components, see Collaboration Access Levels.

The IProject.getRole method takes in the role type (guest, member or leader) and returns the associated IRole object for the project. To define roles for a project, follow the steps below.

  1. Create a PRC session. For details, see Initiating a PRC Session to Use IDK Remote APIs.
  2. Get the project ID and retrieve the associated object.
  3. Get the role to assign.
  4. Add users to the role.
  5. Set any specific access level restrictions.
    Note: You must call store after making any changes or they will not be persisted.

Java

...

//get the project
IProjectManager projectManager = getProjectManager(request, response, out);
IProject project = projectManager.getProject(projectID);

//get the guest role for the project
IRole guestrole = project.getRole(RoleType.GUEST);

//add the guests from a community and an individual user to the role
guestrole.addCommunityMember(CommunityID, COMMUNITY_GUEST);
guestrole.addMember(UserID, USER);

//set the access level for discussions to write
guestrole.setAccessLevel(FunctionalArea.DISCUSSION, AccessLevel.WRITE);

//call store to persist the changes
guestrole.store()

...

.NET (C#)

...

//get the project
Plumtree.Remote.PRC.Collaboration.Project.IProjectManager projectManager = GetProjectManager(Request, Response);
IProject project = GetProject(projectID);

//get the guest role for the project
IRole guestrole = project.GetRole(RoleTypes.Guest);

//add the guests from a community and an individual user to the role
guestrole.AddCommunityMember(CommunityID, CommunityGuest);
guestrole.AddMember(UserID, User);

//set the access level for discussions to write
guestrole.SetAccessLevel(FunctionalAreas.Discussion, AccessLevels.Write);

//call store to persist the changes
guestrole.Store();

...

.NET (VB)

...

//get the project
dim projectManager As Plumtree.Remote.PRC.Collaboration.Project.IProjectManager = GetProjectManager(Request, Response)
dim project As IProject = GetProject(projectID)

//get the guest role for the project
dim guestrole As IRole = project.GetRole(RoleTypes.Guest)

//add the guests from a community and an individual user to the role
guestrole.AddCommunityMember(CommunityID, CommunityGuest)
guestrole.AddMember(UserID, User)

//set the access level for discussions to write
guestrole.SetAccessLevel(FunctionalAreas.Discussion, AccessLevels.Write)

//call store to persist the changes
guestrole.Store()

...

  Back to Top      Previous Next