Search in sources :

Example 6 with ConcatPropertyValue

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

the class BasicToscaParser method postProcessPropVal.

private void postProcessPropVal(AbstractPropertyValue value) {
    if (value instanceof ConcatPropertyValue) {
        ConcatPropertyValue concatPropertyValue = (ConcatPropertyValue) value;
        safe(concatPropertyValue.getParameters()).forEach(this::postProcessPropVal);
    } else if (value instanceof FunctionPropertyValue) {
        FunctionPropertyValue functionPropertyValue = (FunctionPropertyValue) value;
        if ("R_TARGET".equals(functionPropertyValue.getParameters().get(0))) {
            functionPropertyValue.getParameters().set(0, "TARGET");
        }
    }
}
Also used : FunctionPropertyValue(org.alien4cloud.tosca.model.definitions.FunctionPropertyValue) ConcatPropertyValue(org.alien4cloud.tosca.model.definitions.ConcatPropertyValue)

Aggregations

ConcatPropertyValue (org.alien4cloud.tosca.model.definitions.ConcatPropertyValue)6 FunctionPropertyValue (org.alien4cloud.tosca.model.definitions.FunctionPropertyValue)5 Map (java.util.Map)2 AbstractPropertyValue (org.alien4cloud.tosca.model.definitions.AbstractPropertyValue)2 IValue (org.alien4cloud.tosca.model.definitions.IValue)2 PropertyDefinition (org.alien4cloud.tosca.model.definitions.PropertyDefinition)2 ScalarPropertyValue (org.alien4cloud.tosca.model.definitions.ScalarPropertyValue)2 ConstraintFunctionalException (org.alien4cloud.tosca.exceptions.ConstraintFunctionalException)1 AttributeDefinition (org.alien4cloud.tosca.model.definitions.AttributeDefinition)1 ComplexPropertyValue (org.alien4cloud.tosca.model.definitions.ComplexPropertyValue)1 NodeTemplate (org.alien4cloud.tosca.model.templates.NodeTemplate)1 Test (org.junit.Test)1