01-22-2009 01:41 PM
01-25-2009 01:32 PM
WebServiceFactory.getAuthorityService().getAuthoritiesForUser(userName);
Then you can filter all the values that start with the GROUP_ prefix to identify all the groups.01-26-2009 05:26 AM
01-26-2009 07:03 AM
serviceRegistry.getAuthorityService().getAuthoritiesForUser(userName);
Web Service code:
Action userGroupsAction = new Action();
userGroupsAction.setActionName("userGroupsAction");
userGroupsAction.setParameters(properties);
ActionExecutionResult[] results = WebServiceFactory.getActionService().executeActions(predicate, new Action[]{userGroupsAction});
02-18-2009 08:20 AM
@Override
protected void executeImpl(Action action, NodeRef nodeRef) {
userName = action.getParameterValue(Constants.PARAM_USER_NAME).toString();
System.out.println("Search groups of user : " + userName);
Set<String> groups = serviceRegistry.getAuthorityService().getAuthoritiesForUser(userName);
String strgroups = "";
int i = 0;
for ( String str : groups ){
if ( i>0 )
strgroups += ",";
strgroups += str;
i++;
}
action.setParameterValue(Constants.PARAM_USER_GROUPS, strgroups);
System.out.println("Groups of user : " + strgroups);
}
ActionServiceSoapBindingStub actionService = WebServiceFactory.getActionService();
Action action = new Action();
NamedValue nv = new NamedValue();
nv.setName(Constants.PARAM_USER_NAME);
nv.setValue("neil");
action.setActionName("userGroupsAction");
action.setParameters(new NamedValue[]{nv});
ActionExecutionResult[] results = actionService.executeActions(prd, new Action[]{action});
03-03-2009 08:21 AM
03-03-2009 10:02 AM
03-20-2009 11:17 AM
NamedValue nv = new NamedValue();
nv.setName(Constants.PROP_USERNAME);
nv.setValue("GROUP_EVERYONE");
Action userGroupsAction = new Action();
userGroupsAction.setActionName("userGroupsAction");
userGroupsAction.setParameters(new NamedValue[]{nv});
ActionExecutionResult[] results = WebServiceFactory.getActionService().executeActions(predicate, new Action[]{userGroupsAction});
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.