public boolean isTopLevel() { return deploymentContext.isTopLevel(); }
public ScopeKey getMutableDeploymentScope(DeploymentContext context) { if (context == null) throw new IllegalArgumentException("Null context"); if (context.isTopLevel()) return new ScopeKey(CommonLevels.APPLICATION, context.getName()); else return new ScopeKey(CommonLevels.DEPLOYMENT, context.getName()); }
public ScopeKey getMutableDeploymentScope(DeploymentContext context) { if (context == null) throw new IllegalArgumentException("Null context"); if (context.isTopLevel()) return new ScopeKey(CommonLevels.APPLICATION, context.getName()); else return new ScopeKey(CommonLevels.DEPLOYMENT, context.getName()); }
/** * Remove a context * * @param context the context * @param addToUndeploy add to undeploy collection */ private void removeContext(DeploymentContext context, boolean addToUndeploy) { String name = context.getName(); allDeployments.remove(name); errorDeployments.remove(name); missingDeployers.remove(name); if (DeploymentState.ERROR.equals(context.getState()) == false) context.setState(DeploymentState.UNDEPLOYING); DeploymentContext parent = context.getParent(); log.debug("Scheduling undeployment: " + name + " parent=" + parent); // Process the top level only if (context.isTopLevel() && addToUndeploy) undeploy.add(context); // Remove all the children List<DeploymentContext> children = context.getChildren(); if (children != null) { for (DeploymentContext child : children) removeContext(child, addToUndeploy); } }
if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent())) deployer.undeploy(unit); else if (log.isTraceEnabled())
if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent())) deployer.undeploy(unit); else if (log.isTraceEnabled())
/** * Add a context. * * @param context the context * @param addToDeploy should we add to deploy collection */ private void addContext(DeploymentContext context, boolean addToDeploy) { allDeployments.put(context.getName(), context); if (context.getState() == DeploymentState.ERROR) { log.debug("Not scheduling addition of context already in error: " + context.getName() + " reason=" + context.getProblem()); return; } context.setState(DeploymentState.DEPLOYING); DeploymentContext parent = context.getParent(); log.debug("Scheduling deployment: " + context.getName() + " parent=" + parent); // Process the top level only if (context.isTopLevel() && addToDeploy) deploy.add(context); // Add all the children List<DeploymentContext> children = context.getChildren(); if (children != null) { for (DeploymentContext child : children) addContext(child, addToDeploy); } }
if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent()))
if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent()))