setFunctionMembership

Applies access-control settings to a folder or workspace. (V1—V1.0.3)

Syntax

public void setFunctionMembership( long binderId, String inputDataAsXML );

Description

The setFunctionMembership operation provides access-control settings for folder or a workspace. The term function is analogous to a role in the user interface (UI).

The primary use of this operation is to establish access-control settings when migrating workspaces and folders from Forum to Teaming. You must ensure that you have migrated Forum user and group names to Teaming that are required for your access-control settings.

NOTE:This operation is an overwrite operation, setting all function memberships for the folder or workspace; you cannot use repeated calls to this operation to set memberships incrementally. So, set all memberships for the workspace or folder with one call.

Parameters and Return Value

binderId

The binder identifier of the folder or workspace for which you want to set access control.

inputDataAsXML

A string of XML containing the values needed to set access control. Here is an example of XML that sets the visitor function:

<workAreaFunctionMemberships>
<workAreaFunctionMembership>
<property name="functionName">__role.visitor</property>
<property name="memberName">jGarces</property>
<property name="memberName">sChen</property>
<property name="members">1,2,3</property>
</workAreaFunctionMembership>
   .
   .
   .
</workAreaFunctionMemberships>

To obtain the functionName value:

  1. Sign in as a site administrator for Teaming.

  2. In the administration portlet, click Configure role definitions.

  3. Click any item (for example, Participant).

  4. Note or copy the identifier in the Role Name text box (for example, __role.participant). This identifier begins with a double underscore ( _ ).

You can pass either user or group names (for example, jGarces or sChen) or user or group identifiers (for example, 1, 2, 3). Teaming reserves the identifiers -1 for the workspace or folder owner, and -2 for a team member.

Example

call.setOperationName(new QName(“setFunctionMembership”)); Object result = call.invoke(new Object[] {new Long(21), s});

This code uses the content of the XML string s to establish access-control settings for the folder or workspace whose binder identifier is 21.

See Also