All Downloads are FREE. Search and download functionalities are using the official Maven repository.

colesico.framework.dslvalidator.commands.MandatoryGroup Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
package colesico.framework.dslvalidator.commands;

import colesico.framework.dslvalidator.ValidationContext;
import colesico.framework.dslvalidator.t9n.ValidatorMessages;

/**
 * If context value is not null executes all sequence commands within the current context.
 * Commands execution is not interrupted when validation errors occur.
 * 

* If current context value is null throws validation exception. */ public class MandatoryGroup extends AbstractSequence { private final ValidatorMessages msg; public MandatoryGroup(ValidatorMessages msg) { this.msg = msg; } @Override public void execute(ValidationContext context) { if (context.getValue() != null) { executeGroup(context); } else { context.addError(MandatoryGroup.class.getSimpleName(), msg.mandatoryValueIsNull()); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy