Search in sources :

Example 6 with LessOrEqualConstraint

use of org.alien4cloud.tosca.model.definitions.constraints.LessOrEqualConstraint 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

LessOrEqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.LessOrEqualConstraint)6 EqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.EqualConstraint)4 GreaterOrEqualConstraint (org.alien4cloud.tosca.model.definitions.constraints.GreaterOrEqualConstraint)4 GreaterThanConstraint (org.alien4cloud.tosca.model.definitions.constraints.GreaterThanConstraint)4 LessThanConstraint (org.alien4cloud.tosca.model.definitions.constraints.LessThanConstraint)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 PatternConstraint (org.alien4cloud.tosca.model.definitions.constraints.PatternConstraint)3 ValidValuesConstraint (org.alien4cloud.tosca.model.definitions.constraints.ValidValuesConstraint)3 PropertyDefinition (org.alien4cloud.tosca.model.definitions.PropertyDefinition)2 Test (org.junit.Test)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