Search in sources :

Example 6 with GreaterOrEqualConstraint

use of org.alien4cloud.tosca.model.definitions.constraints.GreaterOrEqualConstraint in project yorc-a4c-plugin by ystia.

the class AbstractLocationConfigurer method printProperties.

private void printProperties(Map<String, List<IMatchPropertyConstraint>> props) {
    for (String kprop : props.keySet()) {
        List<IMatchPropertyConstraint> lc = props.get(kprop);
        for (IMatchPropertyConstraint mpc : lc) {
            if (mpc instanceof LessOrEqualConstraint) {
                LessOrEqualConstraint cons = (LessOrEqualConstraint) mpc;
                log.debug("  " + kprop + " <= " + cons.getLessOrEqual());
            } else if (mpc instanceof EqualConstraint) {
                EqualConstraint cons = (EqualConstraint) mpc;
                log.debug("  " + kprop + " == " + cons.getEqual());
            } else if (mpc instanceof GreaterOrEqualConstraint) {
                GreaterOrEqualConstraint cons = (GreaterOrEqualConstraint) mpc;
                log.debug("  " + kprop + " >= " + cons.getGreaterOrEqual());
            } else if (mpc instanceof GreaterThanConstraint) {
                GreaterThanConstraint cons = (GreaterThanConstraint) mpc;
                log.debug("  " + kprop + " > " + cons.getGreaterThan());
            } else if (mpc instanceof LessThanConstraint) {
                LessThanConstraint cons = (LessThanConstraint) mpc;
                log.debug("  " + kprop + " < " + cons.getLessThan());
            } else {
                log.debug("  " + kprop + " " + mpc.toString());
            }
        }
    }
}
Also used : LessOrEqualConstraint(org.alien4cloud.tosca.model.definitions.constraints.LessOrEqualConstraint) GreaterOrEqualConstraint(org.alien4cloud.tosca.model.definitions.constraints.GreaterOrEqualConstraint) IMatchPropertyConstraint(org.alien4cloud.tosca.model.definitions.constraints.IMatchPropertyConstraint) GreaterThanConstraint(org.alien4cloud.tosca.model.definitions.constraints.GreaterThanConstraint) LessOrEqualConstraint(org.alien4cloud.tosca.model.definitions.constraints.LessOrEqualConstraint) EqualConstraint(org.alien4cloud.tosca.model.definitions.constraints.EqualConstraint) GreaterOrEqualConstraint(org.alien4cloud.tosca.model.definitions.constraints.GreaterOrEqualConstraint) LessThanConstraint(org.alien4cloud.tosca.model.definitions.constraints.LessThanConstraint)

Aggregations

GreaterOrEqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.GreaterOrEqualConstraint)6 EqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.EqualConstraint)4 GreaterThanConstraint (org.alien4cloud.tosca.model.definitions.constraints.GreaterThanConstraint)4 LessOrEqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.LessOrEqualConstraint)4 LessThanConstraint (org.alien4cloud.tosca.model.definitions.constraints.LessThanConstraint)4 PatternConstraint (org.alien4cloud.tosca.model.definitions.constraints.PatternConstraint)4 PropertyConstraint (org.alien4cloud.tosca.model.definitions.PropertyConstraint)3 InRangeConstraint (org.alien4cloud.tosca.model.definitions.constraints.InRangeConstraint)3 LengthConstraint (org.alien4cloud.tosca.model.definitions.constraints.LengthConstraint)3 MaxLengthConstraint (org.alien4cloud.tosca.model.definitions.constraints.MaxLengthConstraint)3 MinLengthConstraint (org.alien4cloud.tosca.model.definitions.constraints.MinLengthConstraint)3 ValidValuesConstraint (org.alien4cloud.tosca.model.definitions.constraints.ValidValuesConstraint)3 PropertyDefinition (org.alien4cloud.tosca.model.definitions.PropertyDefinition)2 FormPropertyDefinition (alien4cloud.ui.form.annotation.FormPropertyDefinition)1 FormDescriptorGenerationException (alien4cloud.ui.form.exception.FormDescriptorGenerationException)1 ArrayList (java.util.ArrayList)1 Matcher (java.util.regex.Matcher)1 ScalarPropertyValue (org.alien4cloud.tosca.model.definitions.ScalarPropertyValue)1 AbstractPropertyConstraint (org.alien4cloud.tosca.model.definitions.constraints.AbstractPropertyConstraint)1 IMatchPropertyConstraint (org.alien4cloud.tosca.model.definitions.constraints.IMatchPropertyConstraint)1