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

Accessing User Information

Portlets can use the Oracle WebCenter Interaction Development Kit (IDK) to access read-only User Information settings that have been entered by users or imported into the portal using a Profile Source Identity Service.

The User Information settings required by a portlet must be selected in the Web Service editor on the User Information page. The standard settings appear at the top of the page; select any settings that should be sent to the portlet. You can select additional settings that already exist in the portal by clicking Add Existing User Info. You can also enter setting names manually; to add rows to the list, click Add User Info.

Once the portlet object has been configured as described above, portlet code can access the User Information settings sent from the portal using the Oracle WebCenter Interaction Development Kit (IDK). In the following example code, the portlet retrieves the Company information property (CompanyUserInfo).

Java

...
// Get the user's company info setting
String companyID;
companyID = portletRequest.getSettingValue(SettingType.User, "CompanyUserInfo");

// if the user's company info does not exist, retrieve it from User Info properties
if (null == companyID) {
companyID = portletRequest.getSettingValue(SettingType.UserInfo, "CompanyUserInfo");
}
... 

.NET

...
' Get the user's company info setting
Dim companyID As String
companyID = portletRequest.GetSettingValue(SettingType.User, "CompanyUserInfo")

' if the user's company info does not exist, retrieve it from User Info properties
If companyID Is Nothing Then
companyID = portletRequest.GetSettingValue(SettingType.UserInfo, "CompanyUserInfo")
End If
...

  Back to Top      Previous Next