return Arrays.asList(ValidationAction.State.values());
}
@Restrict("#{s:hasPermission(versionHome.instance, 'update')}")
public void updateValidationOption(String name, String state) {
ValidationId validatationId = ValidationId.valueOf(name);
for (Map.Entry<ValidationId, ValidationAction> entry : getValidations()
.entrySet()) {
if (entry.getKey().name().equals(name)) {
getValidations().get(validatationId).setState(
ValidationAction.State.valueOf(state));
getInstance().getCustomizedValidations().put(
entry.getKey().name(),
entry.getValue().getState().name());
ensureMutualExclusivity(getValidations().get(validatationId));
break;
}
}
update();
conversationScopeMessages.setMessage(FacesMessage.SEVERITY_INFO,
msgs.format("jsf.validation.updated",
validatationId.getDisplayName(), state));
}