Package org.jboss.deployers.structure.spi

Examples of org.jboss.deployers.structure.spi.DeploymentContext


   public ManagedDeployment getManagedDeployment(String name) throws DeploymentException
   {
      if (mgtDeploymentCreator == null)
         throw new IllegalArgumentException("Null managed deployment creator.");

      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;
   }
View Full Code Here


      return root;
   }

   public Map<String, ManagedObject> getManagedObjects(String name) throws DeploymentException
   {
      DeploymentContext context = getDeploymentContext(name, true);
      return getManagedObjects(context);
   }
View Full Code Here

      return deployers.getManagedObjects(context);
   }

   public Graph<Map<String, ManagedObject>> getDeepManagedObjects(String name) throws DeploymentException
   {
      DeploymentContext context = getDeploymentContext(name);
      Graph<Map<String, ManagedObject>> managedObjectsGraph = new Graph<Map<String, ManagedObject>>();
      Vertex<Map<String, ManagedObject>> parent = new Vertex<Map<String, ManagedObject>>(context.getName());
      managedObjectsGraph.setRootVertex(parent);
      Map<String, ManagedObject> managedObjects = getManagedObjects(context);
      parent.setData(managedObjects);
      processManagedObjects(context, managedObjectsGraph, parent);
View Full Code Here

   private DeploymentContext determineStructure(Deployment deployment) throws DeploymentException
   {
      StructuralDeployers structuralDeployers = getStructuralDeployers();
      if (structuralDeployers != null)
      {
          DeploymentContext result = structuralDeployers.determineStructure(deployment);
          if (result != null)
             return result;
      }
      throw new DeploymentException("No structural deployers.");
   }
View Full Code Here

      {
         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);
View Full Code Here

      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);
View Full Code Here

      this.mgtDeploymentCreator = mgtDeploymentCreator;
   }

   public Deployment getDeployment(String name)
   {
      DeploymentContext context = getTopLevelDeploymentContext(name);
      if (context != null)
         return context.getDeployment();
      else
         return toRedeploy.get(name);
   }
View Full Code Here

   }

   @Deprecated
   public DeploymentContext getDeploymentContext(String name, boolean errorNotFound) throws DeploymentException
   {
      DeploymentContext context = getDeploymentContext(name);
      if (errorNotFound && context == null)
         throw new DeploymentException("Context " + name + " not found");

      return context;
   }
View Full Code Here

      return context;
   }

   public DeploymentUnit getDeploymentUnit(String name)
   {
      DeploymentContext context = getDeploymentContext(name);
      if (context == null)
         return null;
      return context.getDeploymentUnit();
   }
View Full Code Here

    * @return true if deployment is a redeployment, false otherwise
    */
   protected boolean checkExistingTopLevelDeployment(Deployment deployment, boolean addToDeploy)
   {
      String name = deployment.getName();
      DeploymentContext previous = topLevelDeployments.get(name);
      if (previous != null)
      {
         log.debug("Removing previous deployment: " + previous.getName());
         toRedeploy.put(name, deployment);
         return true;
      }
      else
      {
View Full Code Here

TOP

Related Classes of org.jboss.deployers.structure.spi.DeploymentContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.