Skip to Content
0
Former Member
Dec 19, 2007 at 03:55 PM

Retrieving Entry Point =True,Roles programatically and retrieving their URL

27 Views

Hi Team,

I want to retrieve the roles whose entry point is equal to true using WebDynpro, And display their names.

When i am trying to display any role name it is displaying with underscores, like if it is content administration role it is displaying like content_admin_role.

I want it to display it just similar name which will display in portal, like content administration how can i do this?

And for each and every role i want to bring the role URL correspond to it.

I tried this and reached upto some extent but not able to open the role perfectly.

I used the below code for getting the names of the roles.

Iterator rit = null;

try

{

IWDClientUser clientUser = WDClientUser.getCurrentUser();

IUser user = clientUser.getSAPUser();

rit = user.getRoles(true);

IRoleFactory rfact = UMFactory.getRoleFactory();

while (rit.hasNext()) {

String roleName = (String) rit.next();

IRole role = rfact.getRole(roleName);

wdComponentAPI.getMessageManager().reportSuccess("Role names1..."+role.getDisplayName().toString());

wdComponentAPI.getMessageManager().reportSuccess("Role names2..."+role.getUniqueName().toString());

//wdComponentAPI.getMessageManager().reportSuccess("Role names3..."+rfact.getRolesOfUser(unique,true));

}

*********************

Also suggest me to retrieve the URL's of respective roles, and it should navigate to that perticular role when i open that URL in browser.

Thanks in advance.

Bala