Search in sources :

Example 1 with DeleteExplicitGroupCommand

use of edu.harvard.iq.dataverse.engine.command.impl.DeleteExplicitGroupCommand in project dataverse by IQSS.

the class ManageGroupsPage method deleteGroup.

public void deleteGroup() {
    if (selectedGroup != null) {
        explicitGroups.remove(selectedGroup);
        try {
            engineService.submit(new DeleteExplicitGroupCommand(dvRequestService.getDataverseRequest(), selectedGroup));
            JsfHelper.addFlashMessage("The group has been deleted.");
        } catch (CommandException ex) {
            String failMessage = "The explicit group cannot be deleted.";
            JH.addMessage(FacesMessage.SEVERITY_FATAL, failMessage);
        }
    } else {
        logger.info("Selected group is null");
    }
}
Also used : DeleteExplicitGroupCommand(edu.harvard.iq.dataverse.engine.command.impl.DeleteExplicitGroupCommand) CommandException(edu.harvard.iq.dataverse.engine.command.exception.CommandException)

Aggregations

CommandException (edu.harvard.iq.dataverse.engine.command.exception.CommandException)1 DeleteExplicitGroupCommand (edu.harvard.iq.dataverse.engine.command.impl.DeleteExplicitGroupCommand)1