Package org.jboss.deployers.spi.structure

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


    * 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


      {
         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

      }
   }

   protected boolean hasStructureBeenModifed(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
   {
      StructureMetaData structureMetaData = deploymentContext.getTransientManagedObjects().getAttachment(StructureMetaData.class);
      return hasStructureBeenModified(root, structureMetaData, null);
   }
View Full Code Here

               }
            }
         }
         if ("".equals(path) == false)
         {
            StructureMetaData structureMetaData = contextInfo.getPredeterminedManagedObjects().getAttachment(StructureMetaData.class);
            return hasStructureBeenModified(contextRoot, structureMetaData, CURRENT_PATH);
         }
      }
      return false;
   }
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

   }

   public void visit(VirtualFile file)
   {
      String path = AbstractStructureDeployer.getRelativePath(context, file);
      StructureMetaData metaData = context.getMetaData();
      ContextInfo contextInfo = metaData.getContext(path);
      if (contextInfo == null)
      {
         // Ignore directories when asked
         try
         {
View Full Code Here

      if (obj == this)
         return true;
      if (obj == null || obj instanceof StructureMetaData == false)
         return false;
     
      StructureMetaData other = (StructureMetaData) obj;

      List<ContextInfo> thisContexts = getContexts();
      List<ContextInfo> otherContexts = other.getContexts();
      if (thisContexts == null)
         return otherContexts == null;
      return thisContexts.equals(otherContexts);
   }
View Full Code Here

    * @param structureContext the context
    * @throws IOException if errors occur during mounting
    */
   protected void mountChildren(StructureContext structureContext) throws IOException
   {
      final StructureMetaData structureMetaData = structureContext.getMetaData();
      final VirtualFile structureRoot = structureContext.getRoot();
      if(structureContext != null)
      {
         for(ContextInfo contextInfo : structureMetaData.getContexts())
         {
            final String contextPath = contextInfo.getPath();
            if(hasValidSuffix(contextPath))
            {
               final VirtualFile child = structureRoot.getChild(contextPath);
View Full Code Here

   }

   public void visit(VirtualFile file)
   {
      String path = AbstractStructureDeployer.getRelativePath(context, file);
      StructureMetaData metaData = context.getMetaData();
      ContextInfo contextInfo = metaData.getContext(path);
      if (contextInfo == null)
      {
         // Ignore directories when asked
         if (ignoreDirectories && file.isDirectory())
            return;
View Full Code Here

      }
   }

   protected boolean hasDeploymentContextBeenModified(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
   {
      StructureMetaData structureMetaData = deploymentContext.getTransientManagedObjects().getAttachment(StructureMetaData.class);
      return hasStructureBeenModified(root, structureMetaData, null);
   }
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.