*/
public void setValidationRules(Map<ValidationId, State> validationStates) {
validationMap.clear();
for (Map.Entry<ValidationId, State> entry : validationStates.entrySet()) {
if (!validationMap.containsKey(entry.getKey())) {
ValidationAction action =
validationFactory.getValidationAction(entry.getKey());
action.setState(entry.getValue());
validationMap.put(entry.getKey(), action);
// if this rule is locked, then lock it's mutual exclusive rule
// as well.
if (action.getRules().isLocked()) {
for (ValidationAction exclusiveAction : action
.getExclusiveValidations()) {
exclusiveAction.getRules().setEnabled(false);
exclusiveAction.getRules().setLocked(true);
validationMap.put(exclusiveAction.getId(),
exclusiveAction);