/** * @param ste the service template of the boundary definitions. Required to get a list of all plans * @param baseURI the base URI of the service. Requried for rendering the topology template for the selections */ public BoundaryDefinitionsJSPData(TServiceTemplate ste, URI baseURI) { this.ste = ste; this.defs = ste.getBoundaryDefinitions(); this.baseURI = baseURI; }
public TTopologyTemplateDefinition convert(org.eclipse.winery.model.tosca.TServiceTemplate node) { if (Objects.isNull(node)) return null; return convert(node.getTopologyTemplate(), node.getBoundaryDefinitions()); }
public PropertyMappingsApi(TServiceTemplate ste) { this.propertyMappings = ste.getBoundaryDefinitions().getProperties().getPropertyMappings(); } }
@Path("boundarydefinitions/") public BoundaryDefinitionsResource getBoundaryDefinitionsResource() { TBoundaryDefinitions boundaryDefinitions = this.getServiceTemplate().getBoundaryDefinitions(); if (boundaryDefinitions == null) { boundaryDefinitions = new TBoundaryDefinitions(); this.getServiceTemplate().setBoundaryDefinitions(boundaryDefinitions); } return new BoundaryDefinitionsResource(this, boundaryDefinitions); }
private void replaceNodeTemplateWithServiceTemplate(TTopologyTemplate topologyTemplate, Map<TNodeTemplate, TServiceTemplate> nodeTemplateToBeSubstitutedWithTopology) { nodeTemplateToBeSubstitutedWithTopology.forEach((substitutableNodeTemplate, stSubstitutingTheNodeTemplate) -> { if (Objects.nonNull(stSubstitutingTheNodeTemplate.getBoundaryDefinitions())) { TTopologyTemplate topologyToImport = stSubstitutingTheNodeTemplate.getTopologyTemplate(); if (Objects.nonNull(stSubstitutingTheNodeTemplate.getBoundaryDefinitions().getCapabilities())) { List<TCapabilityRef> capabilities = stSubstitutingTheNodeTemplate.getBoundaryDefinitions().getCapabilities().getCapability(); ingoingRelations.forEach(ingoing -> { capabilities.forEach(tCapabilityRef -> { if (Objects.nonNull(stSubstitutingTheNodeTemplate.getBoundaryDefinitions().getRequirements())) { List<TRequirementRef> requirements = stSubstitutingTheNodeTemplate.getBoundaryDefinitions().getRequirements().getRequirement(); outgoingRelations.forEach(outgoing -> { requirements.forEach(requirementRef -> {
public void visit(TServiceTemplate serviceTemplate) { Objects.requireNonNull(serviceTemplate); visit((TExtensibleElements) serviceTemplate); final TTopologyTemplate topologyTemplate = serviceTemplate.getTopologyTemplate(); if (topologyTemplate != null) { topologyTemplate.accept(this); } final TTags tags = serviceTemplate.getTags(); if (tags != null) { for (TTag tag : tags.getTag()) { tag.accept(this); } } final TPlans plans = serviceTemplate.getPlans(); if (plans != null) { for (TPlan plan : plans.getPlan()) { plan.accept(this); } } final TBoundaryDefinitions boundaryDefinitions = serviceTemplate.getBoundaryDefinitions(); if (boundaryDefinitions != null) { boundaryDefinitions.accept(this); } }
if ((boundaryDefs = serviceTemplate.getBoundaryDefinitions()) != null) { TPolicies policies = boundaryDefs.getPolicies(); if (policies != null) {