public Deployment getDeployment() { return parent.getDeployment(); }
public Deployment getDeployment() { return parent.getDeployment(); }
public Collection<Deployment> getTopLevel() { List<Deployment> result = new ArrayList<Deployment>(); for (DeploymentContext context : topLevelDeployments.values()) { Deployment deployment = context.getDeployment(); if (deployment != null) result.add(deployment); else throw new IllegalStateException("Context has no deployment? " + context.getName()); } return result; }
public Deployment getDeployment(String name) { DeploymentContext context = getTopLevelDeploymentContext(name); if (context == null) return null; return context.getDeployment(); }
public void undeploy(String... names) throws DeploymentException { if (names == null) throw new IllegalArgumentException("Null names."); List<Deployment> deployments = new ArrayList<Deployment>(); for(String name : names) { DeploymentContext context = getDeploymentContext(name); if (context != null) deployments.add(context.getDeployment()); else if (log.isTraceEnabled()) log.trace("No such deployment present: " + name); } if (deployments.isEmpty() == false) undeploy(deployments.toArray(new Deployment[deployments.size()])); }