public void error(DeploymentContext context) { visitor.error(context.getDeploymentUnit()); } }
public DeploymentUnit getTopLevel() { DeploymentContext context = deploymentContext.getTopLevel(); return context.getDeploymentUnit(); }
public DeploymentUnit getComponent(String name) { if (name == null) throw new IllegalArgumentException("Null name"); DeploymentContext component = getComponentContext(name); return component != null ? component.getDeploymentUnit() : null; }
public Map<String, ManagedObject> getManagedObjects(DeploymentContext context) throws DeploymentException { if (context == null) throw new IllegalArgumentException("Null context"); Map<String, ManagedObject> managedObjects = new HashMap<String, ManagedObject>(); for (DeployerWrapper deployer : deployers) deployer.build(context.getDeploymentUnit(), managedObjects); return managedObjects; }
public DeploymentUnit getParent() { DeploymentContext parent = deploymentContext.getParent(); if (parent == null) return null; return parent.getDeploymentUnit(); }
public DeploymentUnit getParent() { DeploymentContext parent = deploymentContext.getParent(); if (parent == null) return null; return parent.getDeploymentUnit(); }
public DeploymentUnit getDeploymentUnit(String name) { DeploymentContext context = getDeploymentContext(name); if (context == null) return null; return context.getDeploymentUnit(); }
public List<DeploymentUnit> getComponents() { List<DeploymentContext> components = deploymentContext.getComponents(); if (components == null || components.isEmpty()) return Collections.emptyList(); List<DeploymentUnit> result = new ArrayList<DeploymentUnit>(components.size()); for (DeploymentContext component : components) { DeploymentUnit unit = component.getDeploymentUnit(); result.add(unit); } return result; }
public List<DeploymentUnit> getChildren() { List<DeploymentContext> children = deploymentContext.getChildren(); if (children == null || children.isEmpty()) return Collections.emptyList(); List<DeploymentUnit> result = new ArrayList<DeploymentUnit>(children.size()); for (DeploymentContext child : children) { DeploymentUnit unit = child.getDeploymentUnit(); result.add(unit); } return result; }
public void visit(DeploymentContext context) throws DeploymentException { visitor.visit(context.getDeploymentUnit()); }
public List<DeploymentUnit> getChildren() { List<DeploymentContext> children = deploymentContext.getChildren(); if (children == null || children.isEmpty()) return Collections.emptyList(); List<DeploymentUnit> result = new ArrayList<DeploymentUnit>(children.size()); for (DeploymentContext child : children) { DeploymentUnit unit = child.getDeploymentUnit(); result.add(unit); } return result; }
public List<DeploymentUnit> getComponents() { List<DeploymentContext> components = deploymentContext.getComponents(); if (components == null || components.isEmpty()) return Collections.emptyList(); List<DeploymentUnit> result = new ArrayList<DeploymentUnit>(components.size()); for (DeploymentContext component : components) { DeploymentUnit unit = component.getDeploymentUnit(); result.add(unit); } return result; }
/** * The <code>getDeploymentUnit</code> method returns the DeploymentUnit * object for the URL supplied. * * @param url an <code>URL</code> value * @return a <code>DeploymentUnit</code> value * @jmx.managed-operation */ public DeploymentUnit getDeploymentUnit(URL url) { String name = contextMap.get(url); if (name == null) return null; DeploymentContext context = getDeploymentContext(url); DeploymentUnit du = context.getDeploymentUnit(); log.debug("getDeploymentUnit, url="+url+", du="+du); return du; }
targetUnit = ctx.getDeploymentUnit();
DeploymentUnit unit = context.getDeploymentUnit(); if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent())) deployer.undeploy(unit);
DeploymentUnit unit = context.getDeploymentUnit(); if (isRelevant(deployer, unit, context.isTopLevel(), context.isComponent())) deployer.undeploy(unit);
/** * Recursively process the DeploymentContext into ManagedDeployments. * * @param context the context * @param parent the parent * @throws DeploymentException for any error */ protected void processManagedDeployment(DeploymentContext context, ManagedDeployment parent) throws DeploymentException { DeploymentUnit unit = context.getDeploymentUnit(); Map<String, ManagedObject> MOs = getManagedObjects(context); ManagedDeployment md = mgtDeploymentCreator.build(unit, MOs, parent); for (DeploymentContext childContext : context.getChildren()) { processManagedDeployment(childContext, md); } }
public ManagedDeployment getManagedDeployment(String name) throws DeploymentException { DeploymentContext context = getDeploymentContext(name, true); Map<String, ManagedObject> rootMOs = getManagedObjects(context); ManagedDeployment root = mgtDeploymentCreator.build(context.getDeploymentUnit(), rootMOs, null); for (DeploymentContext childContext : context.getChildren()) { processManagedDeployment(childContext, root); } return root; }
private boolean hasAttachmentsInternal(boolean checkParent) { DeploymentContext deploymentContext = getDeploymentContext(); if (deploymentContext.getTransientAttachments().hasAttachments()) return true; else if (deploymentContext.getTransientManagedObjects().hasAttachments()) return true; else if (deploymentContext.getPredeterminedManagedObjects().hasAttachments()) return true; return checkParent && deploymentContext.getParent().getDeploymentUnit().hasAttachments(); }
public boolean hasAttachments() { if (deploymentContext.getTransientAttachments().hasAttachments()) return true; else if (deploymentContext.getTransientManagedObjects().hasAttachments()) return true; else if (deploymentContext.getPredeterminedManagedObjects().hasAttachments()) return true; if (deploymentContext.isComponent()) return deploymentContext.getParent().getDeploymentUnit().hasAttachments(); return false; }