I was wondering how, if possible, you can retrieve the worksets and pages that belong to a role. I have the role information for a user right now, but I want to know the pages and worksets that are attached to the role.
The reason for all of this is I am dynamically creating a start page, and depending on the role of the user, different information appears within the start page.
I had done this in EP 5.0, but now we are migrating to EP6.0 SR1. I have been surfing through the Javadocs, but have not yet found a clear cut way of finding the information.
If anyone has an answer, it would be appreciated!!
Thanks and best regards,
there are different ways of doing this. The hard way is to retrieve this information directly from the PCD (ugly).
More comfortable is using the NavigationEventsHelperService:
NavigationEventsHelperService navHelperService = (NavigationEventsHelperService)PortalRuntime.getRuntimeResources().getService("com.sap.portal.navigation.helperservice.navigation_events_helper");
Check out this class and it's method (by decompiling).
For instance, you can get the actual NavNode by
INavigationNode navNode = navHelperService.getCurrentLaunchNavNode(request);
From this, you can for example ask for the children or also for the children including the hidden elements and so on.
Hope it helps