public boolean containsAll(PropertyGroup other) { for (final Property property: other) { if (!contains(property)) { return false; } } return true; }
@Override public final boolean addAll(Collection<? extends T> c) { boolean overall = true; for (T element : c) { overall &= add(element); } return overall; }
public Boolean replaceAll(Collection<? extends T> c){ boolean overall = true; for (T element : c) { overall &= replace(element); } return overall; }
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; }
public Deployment clone(){ Deployment tmp=new Deployment(); tmp.getComponents().addAll(this.getComponents()); tmp.getComponentInstances().addAll(this.getComponentInstances()); tmp.getExecuteInstances().addAll(this.getExecuteInstances()); tmp.getProviders().addAll(this.getProviders()); tmp.getRelationshipInstances().addAll(this.getRelationshipInstances()); tmp.getClouds().addAll(this.getClouds()); tmp.getRelationships().addAll(this.getRelationships()); tmp.setName(this.getName()); return tmp; }
private void removeEC(ExternalComponentInstance<? extends ExternalComponent> ni) { removedECs.put(ni,currentDM.getComponentInstances().onlyInternals().hostedOn(ni).toList()); //create action }
public boolean isDefined(String propertyName) { return get(propertyName) != null; }
public InternalComponentGroup internalComponents() { return components.onlyInternals(); }
public void reset(){ setCurrentModel(null); alreadyDeployed=new ComponentInstanceGroup<ComponentInstance<? extends Component>>(); alreadyStarted=new ComponentInstanceGroup<ComponentInstance<? extends Component>>(); }
public RequiredExecutionPlatform(String name, Collection<Property> demands) { super(name); this.demands = new PropertyGroup(demands); }
@Override public final boolean removeAll(Collection<?> c) { boolean overall = true; for (Object element : c) { overall &= remove(element); } return overall; }
public VMInstance(String name, VM type) { super(name, type); this.clouds = new CloudGroup(); }
public WithResources(String name) { super(name); this.resources = new ResourceGroup(); }
public boolean hasProperty(String propertyName) { return this.properties.isDefined(propertyName); }
public boolean belongsTo(Cloud cloud) { return clouds.contains(cloud); }
public ProvidedExecutionPlatform(String name, Collection<Property> offers) { super(name); this.offers = new PropertyGroup(offers); }
public boolean hasProperty(String key, String value) { return this.properties.contains(key, value); }
public WithProperties(String name) { super(name); properties = new PropertyGroup(); }