public InternalComponentGroup internalComponents() { return components.onlyInternals(); }
@Override protected List<InternalComponent> collectCandidates(Deployment deployment) { List<InternalComponent> candidates = new ArrayList<InternalComponent>(); for (InternalComponent artefact : deployment.getComponents().onlyInternals()) { if (isCandidate(artefact)) { candidates.add(artefact); } } return candidates; }
private InternalComponent findClient(Deployment container) throws IllegalStateException { final InternalComponent client = container.getComponents().onlyInternals().firstNamed(clientName); if (client == null) { final String error = String.format("type '%s' not found",clientName); throw new IllegalStateException(formatError(error)); } return client; }
public void internalComponentsToPOJO(List<net.cloudml.core.InternalComponent> components) { int counter = 0; for (net.cloudml.core.InternalComponent c: components) { internalComponentToPOJO(c); counter++; } assert counter == model.getComponents().onlyInternals().size(); assert counter == internalComponents.size(); }
private InternalComponent findType(Deployment container) throws IllegalStateException { final InternalComponent type = container.getComponents().onlyInternals().firstNamed(getTypeName()); if (type == null) { final String error = String.format("Unable to find an internal component type named '%s'", getTypeName()); throw new IllegalStateException(error); } return type; } }
for(InternalComponent ic: d.getComponents().onlyInternals()){ for(Property p : ic.getProperties()){ if(p.getName().contains("env:")){
public net.cloudml.core.CloudMLModel toKMF(Deployment deploy) { kDeploy.setName(deploy.getName()); convertProperties(deploy,kDeploy,factory); providersToKmf(deploy.getProviders().toList()); externalComponentToKmf(deploy.getComponents().onlyExternals().toList()); internalComponentsToKmf(deploy.getComponents().onlyInternals().toList()); externalComponentInstanceToKmf(deploy.getComponentInstances().onlyExternals().toList()); internalComponentInstancesToKmf(deploy.getComponentInstances().onlyInternals().toList()); executesToKmf(deploy.getExecuteInstances().toList()); relationshipsToKmf(deploy.getRelationships()); relationshipInstancesToKmf(deploy.getRelationshipInstances().toList()); return kDeploy; }