Package org.jboss.deployers.spi.structure

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


      return checkFileMatchers(file);
   }

   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
   {
      ContextInfo context = null;
      VirtualFile file = structureContext.getFile();
      try
      {
         boolean trace = log.isTraceEnabled();
         if (isLeaf(file) == true)
View Full Code Here


    * @param root the deployment root
    * @param structureMetaData the structure metadata
    */
   protected void checkForModification(VirtualFile root, StructureMetaData structureMetaData)
   {
      ContextInfo contex = structureMetaData.getContext("");
      if (contex == null || contex.getModificationType() != null)
         return;

      if (matchers != null && matchers.isEmpty() == false)
      {
         for (ModificationTypeMatcher matcher : matchers)
View Full Code Here

   private ModificationType modificationType;

   public boolean determineModification(VirtualFile root, StructureMetaData structureMetaData)
   {
      ContextInfo contextInfo = structureMetaData.getContext("");
      if (childrenOnly == false)
      {
         boolean result = isModificationDetermined(root, contextInfo);
         if (result)
         {
            contextInfo.setModificationType(modificationType);
            return true;
         }
      }

      if (checkChildren)
      {
         List<ContextInfo> contexts = structureMetaData.getContexts();
         if (contexts != null && contexts.isEmpty() == false)
         {
            for (ContextInfo child : contexts)
            {
               String path = child.getPath();
               // Only process the child contexts
               if ("".equals(path) == false)
               {
                  try
                  {
                     VirtualFile file = root.getChild(path);
                     if (file != null && isModificationDetermined(file, child))
                     {
                        contextInfo.setModificationType(modificationType);
                        return true;
                     }
                  }
                  catch (Exception e)
                  {
View Full Code Here

      this.includeWebInfInClasspath = includeWebInfInClasspath;
   }

   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
   {
      ContextInfo context = null;
      VirtualFile file = structureContext.getFile();
      try
      {
         boolean trace = log.isTraceEnabled();
View Full Code Here

      this.webInfLibFilter = webInfLibFilter;
   }

   public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData metaData, VFSStructuralDeployers deployers) throws DeploymentException
   {
      ContextInfo context = null;
      try
      {
         boolean trace = log.isTraceEnabled();

         if (isLeaf(file) == false)
View Full Code Here

      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;
         List<String> metaDataPath = recognised.getMetaDataPath();
         if (metaDataPath == null || metaDataPath.isEmpty())
            parentContext = StructureMetaDataFactory.createContextInfo(relativePath, recognised.getClassPath());
         else
            parentContext = StructureMetaDataFactory.createContextInfo(relativePath, metaDataPath, recognised.getClassPath());

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

    * @return the context info
    * @throws IllegalArgumentException for a null root or structure metaData
    */
   protected ContextInfo createContext(StructureContext context, String metaDataPath)
   {
      ContextInfo result = applyMetadataPath(context, metaDataPath);
      applyStructure(context, result);
      return result;
   }
View Full Code Here

    * @return the context info
    * @throws IllegalArgumentException for a null root or structure metaData
    */
   protected ContextInfo createContext(StructureContext context, String[] metaDataPaths)
   {
      ContextInfo result = applyMetadataPaths(context, metaDataPaths);
      applyStructure(context, result);
      return result;
   }
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 ContextInfo == false)
         return false;
     
      ContextInfo other = (ContextInfo) obj;
      if (getPath().equals(other.getPath()) == false)
         return false;

      List<String> thisMetaDataPath = getMetaDataPath();
      List<String> otherMetaDataPath = other.getMetaDataPath();
      if (thisMetaDataPath.equals(otherMetaDataPath) == false)
         return false;

      List<ClassPathEntry> thisClassPath = getClassPath();
      List<ClassPathEntry> otherClassPath = other.getClassPath();
      if (thisClassPath == null)
         return otherClassPath == null;
      return thisClassPath.equals(otherClassPath);
   }
View Full Code Here

TOP

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

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.