Show TOC Start of Content Area

Procedure documentation Remote Roles  Locate the document in its SAP Library structure

A portal service enables you to retrieve an IRole object for a role located on a remote portal in a federated portal environment.

A major use case is for a consumer portal application to assign users on the consumer portal to roles on a producer portal. For more information, see 'Remote Role Assignment' Mode.

Prerequisites

      You add the sharing reference com.sap.portal.ivs.global.rraapis to your project.

      You add a reference to com.sap.portal.ivs.global.rraapis_api.jar (located in the com.sap.portal.ivs.global.rraapis portal application) to your build path.

      You add the following import statements:

import com.sap.security.api.IRole;

import com.sap.security.api.UMException;

import com.sapportals.portal.prt.runtime.PortalRuntime;

import com.sap.portal.ivs.global.roles.IGetRemoteRole;

Procedure

...

       1.      Get an instance of the service for retrieving remote roles.

IRole myRemoteRole = null;

IGetRemoteRole myService = (IGetRemoteRole) PortalRuntime
    .getRuntimeResources().getService(IGetRemoteRole.KEY);

       2.      Retrieve the role by specifying its PCD location and the alias of the producer portal on which the role is located.

try {

    myRemoteRole = myService.getRemoteRole(
       
"myProducerAlias","pcd:portal_content/myFolder/myRole");

} catch (UMException e) {}

 

End of Content Area