@Override public boolean add(ProvidedExecutionPlatform e) { e.getOwner().set(Component.this); return super.add(e); }
private void initProvidedExecutionPlatforms(Component c, net.cloudml.core.Component kc) { List<ProvidedExecutionPlatform> providedExecutionPlatforms = c.getProvidedExecutionPlatforms().toList(); if (providedExecutionPlatforms != null) { List<net.cloudml.core.ProvidedExecutionPlatform> temp = new ArrayList<net.cloudml.core.ProvidedExecutionPlatform>(); for (ProvidedExecutionPlatform pep: providedExecutionPlatforms) { if (pep != null) { net.cloudml.core.ProvidedExecutionPlatform kpep = initProvidedExecutionPlatform(pep, kc); temp.add(kpep); this.providedExecutionPlatforms.put(pep.getName(), kpep); } } kc.setProvidedExecutionPlatforms(temp); } }
@Override public void clear() { for (ProvidedExecutionPlatform platform: this) { platform.getOwner().discard(); } super.clear(); }
v.setPrivateKey(existingVM.getPrivateKey()); v.setProvider(existingVM.getProvider()); ProvidedExecutionPlatformGroup pepg=new ProvidedExecutionPlatformGroup(); for(ProvidedExecutionPlatform pep: existingVM.getProvidedExecutionPlatforms()){ ArrayList<Property> pg=new ArrayList<Property>(); pepg.add(p); v.setProvidedExecutionPlatforms(pepg.toList()); currentModel.getComponents().add(v);
@Override public boolean remove(Object o) { if (o instanceof ProvidedExecutionPlatform) { ProvidedExecutionPlatform platform = (ProvidedExecutionPlatform) o; platform.getOwner().discard(); } return super.remove(o); }
v.setPrivateKey(existingVM.getPrivateKey()); v.setProvider(existingVM.getProvider()); ProvidedExecutionPlatformGroup pepg=new ProvidedExecutionPlatformGroup(); for(ProvidedExecutionPlatform pep: existingVM.getProvidedExecutionPlatforms()){ ArrayList<Property> pg=new ArrayList<Property>(); pepg.add(p); v.setProvidedExecutionPlatforms(pepg.toList()); target.getComponents().add(v);
v.setPrivateKey(existingVM.getPrivateKey()); v.setProvider(provider); ProvidedExecutionPlatformGroup pepg=new ProvidedExecutionPlatformGroup(); for(ProvidedExecutionPlatform pep: existingVM.getProvidedExecutionPlatforms()){ ArrayList<Property> pg=new ArrayList<Property>(); pepg.add(p); v.setProvidedExecutionPlatforms(pepg.toList()); targetModel.getComponents().add(v);
private void initProvidedExecutionPlatforms(net.cloudml.core.Component kc, Component c) { List<net.cloudml.core.ProvidedExecutionPlatform> providedExecutionPlatforms = kc.getProvidedExecutionPlatforms(); if (providedExecutionPlatforms != null) { for (net.cloudml.core.ProvidedExecutionPlatform kpep: providedExecutionPlatforms) { c.getProvidedExecutionPlatforms().add(initProvidedExecutionPlatform(kpep, c)); } } }
@Override public void integrateIn(Component container) { ProvidedExecutionPlatform platform = new ProvidedExecutionPlatform(getName()); prepare(platform); setupOffers(platform); platform.getOwner().set(container); container.getProvidedExecutionPlatforms().add(platform); }