Package org.jboss.deployers.spi.structure

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


    * @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);
      ContextInfo result = StructureMetaDataFactory.createContextInfo(path, metaDataPath, classPath);
      structure.addContext(result);
      return result;
   }
View Full Code Here

      else
      {
         mutable = (MutableAttachments) attachments;
      }
     
      StructureMetaData structure = mutable.getAttachment(StructureMetaData.class);
      // No previous structure
      if (structure == null)
      {
         structure = StructureMetaDataFactory.createStructureMetaData();
         mutable.addAttachment(StructureMetaData.class, structure);
View Full Code Here

               context.addChild(childContext);

               Attachments attachments = child.getPredeterminedManagedObjects();
               if (attachments != null)
               {
                  StructureMetaData childStructure = attachments.getAttachment(StructureMetaData.class);
                  if (childStructure != null)
                     populateContext(childContext, childStructure);
               }
            }
         }
View Full Code Here

    * Will return null if this unit is not part of an ear deployment.
    */
   private List<ClassPathEntry> getClassPathEntries(VFSDeploymentUnit unit)
   {
//      log.info("class path = " + unit.getTopLevel().getAttachment(StructureMetaData.class).getContext("").getClassPath());
      StructureMetaData smd = unit.getTopLevel().getAttachment(StructureMetaData.class);
      if(smd == null)
         return null;
      // A context without a path is the one we want (see AbstractStructureDeployer)
      return smd.getContext("").getClassPath();
   }
View Full Code Here

      log.debug("Removed structure deployer " + deployer);
   }
  
   public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData structureMetaData) throws DeploymentException
   {
      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

   }

   protected Deployment createSimple() throws Exception
   {
      Deployment deployment = createDeployment();
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);

      DeploymentFactory factory = getDeploymentFactory();
      factory.addContext(deployment, "");
View Full Code Here

   }

   protected Deployment createSimpleWithAttachment() throws Exception
   {
      Deployment deployment = createDeployment();
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      attachments.addAttachment(StructureMetaData.class, structure);
      attachments.addAttachment("test", "hello");

      DeploymentFactory factory = getDeploymentFactory();
View Full Code Here

      assertNotNull(context);
     
      assertEquals(deployment.getName(), context.getName());
     
      MutableAttachments attachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
      StructureMetaData structure = attachments.getAttachment(StructureMetaData.class);
      checkAttachments(context, deployment);

      assertNotNull(structure);
      checkDeployment(context, structure);

      ContextInfo contextInfo = structure.getContext("");
      assertNotNull(contextInfo);
      checkContextInfo(context, contextInfo);
   }
View Full Code Here

      else
         expectedName = parentName + "/" + contextInfo.getPath();
     
      assertEquals(expectedName, context.getName());
     
      StructureMetaData structure = contextInfo.getPredeterminedManagedObjects().getAttachment(StructureMetaData.class);
      checkAttachments(context, contextInfo);
      if (structure != null)
         checkDeployment(context, structure);

      checkContextInfo(context, contextInfo);
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.