public void performMapping(Map<String, Object> contextMap, RoleGroup mappedObject) { if (contextMap == null || contextMap.isEmpty()) throw PicketBoxMessages.MESSAGES.invalidNullArgument("contextMap"); //Obtain the principal to roles mapping Principal principal = getCallerPrincipal(contextMap); if (principal != null) { String username = principal.getName(); Util.addRolesToGroup(username, mappedObject, roles); result.setMappedObject(mappedObject); } }
public void performMapping(Map<String, Object> contextMap, RoleGroup mappedObject) { if (contextMap == null || contextMap.isEmpty()) throw PicketBoxMessages.MESSAGES.invalidNullArgument("contextMap"); //Obtain the principal to roles mapping Principal principal = getCallerPrincipal(contextMap); if (principal != null && rolesQuery != null) { String username = principal.getName(); Util.addRolesToGroup(username, mappedObject, dsJndiName, rolesQuery, suspendResume, tm); result.setMappedObject(mappedObject); } }