use of edu.harvard.iq.dataverse.engine.command.impl.UpdateExplicitGroupCommand in project dataverse by IQSS.
the class ManageGroupsPage method saveExplicitGroup.
public void saveExplicitGroup(ActionEvent ae) {
ExplicitGroup eg = selectedGroup;
if (getSelectedGroupAddRoleAssignees() != null) {
try {
for (RoleAssignee ra : getSelectedGroupAddRoleAssignees()) {
eg.add(ra);
}
} catch (GroupException ge) {
JsfHelper.JH.addMessage(FacesMessage.SEVERITY_ERROR, "Group edit failed.", ge.getMessage());
return;
}
}
try {
eg = engineService.submit(new UpdateExplicitGroupCommand(dvRequestService.getDataverseRequest(), eg));
JsfHelper.addSuccessMessage("Succesfully saved group " + eg.getDisplayName());
} catch (CommandException ex) {
JsfHelper.JH.addMessage(FacesMessage.SEVERITY_ERROR, "Group Save failed.", ex.getMessage());
} catch (Exception ex) {
JH.addMessage(FacesMessage.SEVERITY_FATAL, "The role was not able to be saved.");
logger.log(Level.SEVERE, "Error saving role: " + ex.getMessage(), ex);
}
showAssignmentMessages();
}
Aggregations