@Override protected VFSDeploymentContext getDeploymentContext() { return (VFSDeploymentContext) super.getDeploymentContext(); } }
@Override protected VFSDeploymentContext getDeploymentContext() { return (VFSDeploymentContext) super.getDeploymentContext(); } }
public DeploymentResourceLoader getResourceLoader() { return getDeploymentContext().getResourceLoader(); }
public DependencyInfo getDependencyInfo() { return getDeploymentContext().getDependencyInfo(); }
public MutableAttachments getTransientManagedObjects() { return getDeploymentContext().getTransientManagedObjects(); }
public DeploymentStage getRequiredStage() { return getDeploymentContext().getRequiredStage(); }
public void setRequiredStage(DeploymentStage stage) { getDeploymentContext().setRequiredStage(stage); }
public ClassLoader getResourceClassLoader() { return getDeploymentContext().getResourceClassLoader(); }
public Object getControllerContextName() { return getDeploymentContext().getControllerContextName(); }
public void visit(DeploymentUnitVisitor visitor) throws DeploymentException { UnitVisitorToContextVisitor contextVisitor = new UnitVisitorToContextVisitor(visitor); getDeploymentContext().visit(contextVisitor); }
public Map<String, Object> getAttachments() { return getAttachmentsInternal(getDeploymentContext().isComponent()); }
public boolean hasAttachments() { return hasAttachmentsInternal(getDeploymentContext().isComponent()); }
public Object removeAttachment(String name) { return getDeploymentContext().getTransientAttachments().removeAttachment(name); }
public Object getAttachment(String name) { return getAttachmentInternal(name, getDeploymentContext().isComponent()); }
public Object addAttachment(String name, Object attachment) { DeploymentContext deploymentContext = getDeploymentContext(); deploymentContext.deployed(); return deploymentContext.getTransientAttachments().addAttachment(name, attachment); }
public void clearChangeCount() { DeploymentContext deploymentContext = getDeploymentContext(); deploymentContext.getTransientAttachments().clearChangeCount(); deploymentContext.getTransientManagedObjects().clearChangeCount(); }
public int getChangeCount() { DeploymentContext deploymentContext = getDeploymentContext(); return deploymentContext.getTransientAttachments().getChangeCount() + deploymentContext.getTransientManagedObjects().getChangeCount(); }
public void clear() { DeploymentContext deploymentContext = getDeploymentContext(); deploymentContext.getTransientAttachments().clear(); deploymentContext.getTransientManagedObjects().clear(); }
private Map<String, Object> getAttachmentsInternal(boolean checkParent) { DeploymentContext deploymentContext = getDeploymentContext(); DeploymentContext parent = deploymentContext.getParent(); if (checkParent == false) parent = null; HashMap<String, Object> result = new HashMap<String, Object>(); if (parent != null) result.putAll(parent.getTransientAttachments().getAttachments()); result.putAll(deploymentContext.getTransientAttachments().getAttachments()); if (parent != null) result.putAll(parent.getTransientManagedObjects().getAttachments()); result.putAll(deploymentContext.getTransientManagedObjects().getAttachments()); if (parent != null) result.putAll(parent.getPredeterminedManagedObjects().getAttachments()); result.putAll(deploymentContext.getPredeterminedManagedObjects().getAttachments()); if (result.isEmpty() == false) deploymentContext.deployed(); return Collections.unmodifiableMap(result); }
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(); }