use of org.alien4cloud.tosca.model.definitions.OperationOutput in project alien4cloud by alien4cloud.
the class TopologyTreeBuilderService method registerOperationOutput.
@SuppressWarnings({ "unchecked", "rawtypes" })
private <V extends AbstractInstantiableToscaType> void registerOperationOutput(final List<? extends IPaaSTemplate> paaSTemplates, final String interfaceName, final String operationName, final String output, final String formatedAttributeName) {
for (IPaaSTemplate<V> paaSTemplate : paaSTemplates) {
if (paaSTemplate.getInterfaces() != null) {
Interface interfass = MapUtils.getObject(paaSTemplate.getInterfaces(), (interfaceName));
if (interfass != null && interfass.getOperations().containsKey(operationName)) {
OperationOutput toAdd = new OperationOutput(output);
if (StringUtils.isNotBlank(formatedAttributeName)) {
toAdd.getRelatedAttributes().add(formatedAttributeName);
}
interfass.getOperations().get(operationName).addOutput(toAdd);
}
}
}
}
Aggregations