on 06-12-2005 11:25 AM
How can you retrieve all the workset attached to a role?
Hi,
You can retrieve the roles assigned to user using the code below:
String userLogonID = "DUMMY_USER";
String userUniqueID;
try {
userUniqueID = UMFactory.getUserFactory().getUserByLogonID(userLogonID).getUniqueID();
} catch (UMException e) {
userUniqueID = null;
e.printStackTrace();
}
if (userUniqueID != null) {
IRoleFactory roleFactory = UMFactory.getRoleFactory();
String[] roles = roleFactory.getRolesOfUser(userUniqueID, true);
IRole role;
if (roles != null) {
for (int i=0; i<=roles.length; i++) {
try {
role = roleFactory.getRole(roles<i>);
//use IPcdContext to retrieve embedded context from the role
} catch (UMException e) {
e.printStackTrace();
}
}
}
}
Unfortunately Im not ready to provide an exact code for worksets retrieving right now, please review the following link to find out how to work with PcdContext:
Thanks,
Yauheni.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi maan,
Do you want to retrieve all the workset attached to a role at runtime??
You can right click on the role and open object.. it will show you all workset, pages and iview attached with this role.
Rdgs,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.