Package org.jboss.deployers.spi.structure

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


      log.debug("Removed structure deployer " + deployer);
   }
  
   public boolean determineStructure(VirtualFile file, StructureContext parentContext) throws DeploymentException
   {
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      StructureContext context = new StructureContext(file, structure, parentContext);
      boolean result = doDetermineStructure(context);
      if (result)
      {
         String relativePath = AbstractStructureDeployer.getRelativePath(context.getParent(), 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 parentContextInfo;
         List<String> metaDataPath = recognised.getMetaDataPath();
         if (metaDataPath == null || metaDataPath.isEmpty())
            parentContextInfo = StructureMetaDataFactory.createContextInfo(relativePath, recognised.getClassPath());
         else
            parentContextInfo = StructureMetaDataFactory.createContextInfo(relativePath, metaDataPath, recognised.getClassPath());

         // copy the modification type information
         parentContextInfo.setModificationType(recognised.getModificationType());
         StructureMetaData structureMetaData = parentContext.getMetaData();
         structureMetaData.addContext(parentContextInfo);
         MutableAttachments attachments = (MutableAttachments) parentContextInfo.getPredeterminedManagedObjects();
         attachments.addAttachment(StructureMetaData.class, structure);
      }
      return result;
   }
View Full Code Here


   {
      StructureContext parentContext = context.getParentContext();
      if (parentContext == null)
         return false;

      StructureMetaData smd = parentContext.getMetaData();
      ContextInfo info = smd.getContext("");
      List<String> metadataPaths = info.getMetaDataPath();
      if (metadataPaths != null && metadataPaths.isEmpty() == false)
      {
         String relativePath = AbstractStructureDeployer.getRelativePath(context.getParent(), context.getFile());
         for (String path : metadataPaths)
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

               applyContextInfo(childContext, child);

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

               applyContextInfo(childContext, child);

               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

      this.filter = filter;
   }

   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

    * @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.getFile();
      for(ContextInfo contextInfo : structureMetaData.getContexts())
      {
         final String contextPath = contextInfo.getPath();
         if(hasValidSuffix(contextPath))
         {
            final VirtualFile child = structureRoot.getChild(contextPath);
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.