Package org.jboss.deployers.spi.structure

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


      Deployer deployer = new StructureOMFDeployer();

      deployer.deploy(unit);
      try
      {
         StructureMetaData metaData = unit.getAttachment(StructureMetaData.class);
         assertNotNull(metaData);
      }
      finally
      {
         deployer.undeploy(unit);
View Full Code Here


      Deployer deployer = new StructureOMFDeployer();

      deployer.deploy(unit);
      try
      {
         StructureMetaData metaData = unit.getAttachment(StructureMetaData.class);
         assertNotNull(metaData);
         assertComparator(metaData, "", "org.jboss.test.deployment.test.SomeDeploymentComparatorTop");
         assertComparator(metaData, "sub.jar", "org.jboss.test.deployment.test.SomeDeploymentComparatorSub");
         assertComparator(metaData, "x.war", "org.jboss.test.deployment.test.SomeDeploymentComparatorX");
      }
View Full Code Here

      ContextInfo context1 = factory.addContext(deployment, "path1", "metaDataPath", classPath);
      assertEquals("path1", context1.getPath());
      assertDefaultMetaDataPath(context1.getMetaDataPath());
      assertEquals(classPath, context1.getClassPath());
     
      StructureMetaData structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1);
     
      deployment = serializeDeserialize(deployment, Deployment.class);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1);
     
      ContextInfo context2 = factory.addContext(deployment, "path2");
      assertEquals("path2", context2.getPath());
      assertDefaultNonPath(context2);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1, context2);

      deployment = serializeDeserialize(deployment, Deployment.class);
      structure = assertStructureMetaData(deployment);
      assertContexts(structure, context1, context2);

      ContextInfo testContext = structure.getContext("path2");
     
      ContextInfo child1 = factory.addContext(testContext, "child1");
      assertEquals("child1", child1.getPath());
      assertDefaultNonPath(child1);

      ContextInfo child2 = factory.addContext(testContext, "child2");
      assertEquals("child2", child2.getPath());
      assertDefaultNonPath(child2);
     
      ContextInfo child3 = factory.addContext(testContext, "child3");
      assertEquals("child3", child3.getPath());
      assertDefaultNonPath(child3);

      assertContexts(structure, context1, context2);
      StructureMetaData childStructure = assertStructureMetaData(testContext);
      assertContexts(childStructure, child1, child2, child3);

      structure = serializeDeserialize(structure, StructureMetaData.class);
      assertContexts(structure, context1, context2);
      testContext = structure.getContext("path2");
View Full Code Here

      {
         if(root.getLastModified() > lastModified)
            return true;
      }

      StructureMetaData structureMetaData = unit.getAttachment(StructureMetaData.class);
      if(structureMetaData == null)
         return false;
     
      ContextInfo info = structureMetaData.getContext(unit.getSimpleName());
      if(info == null && unit.isTopLevel())
         info = structureMetaData.getContext("");
     
      if(info == null)
         return false;
     
      return hasBeenModifed(root, info, lastModified);
View Full Code Here

   public BootstrapDeployment(KernelDeployment deployment)
   {
      super(new AbstractDeploymentContext(deployment.getName(), ""));
      this.deployment = deployment;
      // Create a pre-determined, DEPLOYED deployment
      StructureMetaData structure = new StructureMetaDataImpl();
      ContextInfo rootInfo = new ContextInfoImpl("");
      structure.addContext(rootInfo);
      predeterminedManagedObjects.addAttachment(KnownDeploymentTypes.class, KnownDeploymentTypes.MCBeans);
      predeterminedManagedObjects.addAttachment(StructureMetaData.class, structure);
      predeterminedManagedObjects.addAttachment(KernelDeployment.class, deployment);
      DeploymentContext rootContext = getDeploymentContext();
      rootContext.setState(DeploymentState.DEPLOYED);
View Full Code Here

      log.debug("Removed structure deployer " + deployer);
   }
  
   public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData structureMetaData)
   {
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      boolean result = doDetermineStructure(root, parent, file, structure);
      if (result)
      {
         String relativePath = AbstractStructureDeployer.getRelativePath(parent, file);
        
         // Something said it recognised it
         ContextInfo recognised = structure.getContext("");
         if (recognised == null)
            throw new IllegalStateException("Something recognised the deployment, but there is no context? " + file);
        
         // Create the context in the parent structure
         ContextInfo parentContext;
View Full Code Here

    * @return the context info
    * @throws IllegalArgumentException for a null parameter
    */
   public ContextInfo addContext(PredeterminedManagedObjectAttachments context, String path)
   {
      StructureMetaData structure = assureStructure(context);
      ContextInfo result = StructureMetaDataFactory.createContextInfo(path);
      structure.addContext(result);
      return result;
   }
View Full Code Here

    * @return the context info
    * @throws IllegalArgumentException for a null parameter
    */
   public ContextInfo addContext(PredeterminedManagedObjectAttachments context, String path, List<ClassPathEntry> classPath)
   {
      StructureMetaData structure = assureStructure(context);
      ContextInfo result = StructureMetaDataFactory.createContextInfo(path, classPath);
      structure.addContext(result);
      return result;
   }
View Full Code Here

    * @return the context info
    * @throws IllegalArgumentException for a null parameter
    */
   public ContextInfo addContext(PredeterminedManagedObjectAttachments context, String path, String metaDataPath, List<ClassPathEntry> classPath)
   {
      StructureMetaData structure = assureStructure(context);
      MetaDataEntry entry = createMetaDataPathEntry(metaDataPath);
      ContextInfo result = StructureMetaDataFactory.createContextInfo(path, entry, classPath);
      structure.addContext(result);
      return result;
   }
View Full Code Here

    * @return the context info
    * @throws IllegalArgumentException for a null parameter
    */
   public ContextInfo addContext(PredeterminedManagedObjectAttachments context, String path, List<String> metaDataPath, List<ClassPathEntry> classPath)
   {
      StructureMetaData structure = assureStructure(context);
      ContextInfo result = StructureMetaDataFactory.createContextInfo(path, metaDataPath, classPath);
      structure.addContext(result);
      return result;
   }
View Full Code Here

TOP

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

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.