AuthorizationManager authManager = CurrentSession.getUserRealm().getAuthorizationManager();
authManager.clearResourceAuthorizations(newresourcePath);
String[] roles = newRoles.split(",");
for (String role: roles) {
String roleName = role.trim();
authManager.authorizeRole(roleName, newresourcePath,
ActionConstants.GET);
authManager.authorizeRole(roleName, newresourcePath,
ActionConstants.PUT);
authManager.authorizeRole(roleName, newresourcePath,
ActionConstants.DELETE);