Package org.jboss.deployers.spi.structure

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


      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


         throw new IllegalStateException("No structure builder has been configured");
     
      Throwable problem = null;

      Attachments attachments = deployment.getPredeterminedManagedObjects();
      StructureMetaData structureMetaData = attachments.getAttachment(StructureMetaData.class);
      if (structureMetaData == null)
      {
         structureMetaData = StructureMetaDataFactory.createStructureMetaData();
         try
         {
View Full Code Here

   }
  
   @Deprecated // Remove this JBDEPLOY-66
   public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData structureMetaData) throws DeploymentException
   {
      StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
      StructureContext context = new StructureContext(root, parent, file, structure, this, null);
      boolean result = doDetermineStructure(context);
      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 result;
   }
  
   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

/* 124 */     if (obj == this)
/* 125 */       return true;
/* 126 */     if ((obj == null) || (!(obj instanceof Externalizable))) {
/* 127 */       return false;
/*     */     }
/* 129 */     StructureMetaData other = (Externalizable)obj;
/*     */
/* 131 */     List thisContexts = getContexts();
/* 132 */     List otherContexts = other.getContexts();
/* 133 */     if (thisContexts == null)
/* 134 */       return otherContexts == null;
/* 135 */     return thisContexts.equals(otherContexts);
/*     */   }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private List<ClassPathEntry> getClassPathEntries(VFSDeploymentUnit unit)
/*     */   {
/* 137 */     StructureMetaData smd = (StructureMetaData)unit.getTopLevel().getAttachment(StructureMetaData.class);
/* 138 */     if (smd == null) {
/* 139 */       return null;
/*     */     }
/* 141 */     return smd.getContext("").getClassPath();
/*     */   }
View Full Code Here

/* 66 */     StructureBuilder builder = getStructureBuilder();
/* 67 */     if (builder == null) {
/* 68 */       throw new IllegalStateException("No structure builder has been configured");
/*    */     }
/* 70 */     Attachments attachments = deployment.getPredeterminedManagedObjects();
/* 71 */     StructureMetaData structureMetaData = (StructureMetaData)attachments.getAttachment(StructureMetaData.class);
/* 72 */     if (structureMetaData == null)
/*    */     {
/* 74 */       structureMetaData = StructureMetaDataFactory.createStructureMetaData();
/*    */       try
/*    */       {
View Full Code Here

/* 130 */           applyContextInfo(childContext, child);
/*     */
/* 132 */           Attachments attachments = child.getPredeterminedManagedObjects();
/* 133 */           if (attachments != null)
/*     */           {
/* 135 */             StructureMetaData childStructure = (StructureMetaData)attachments.getAttachment(StructureMetaData.class);
/* 136 */             if (childStructure != null)
/* 137 */               populateContext(childContext, childStructure);
/*     */           }
/*     */         }
/*     */       }
View Full Code Here

/* 134 */     log.debug("Removed structure deployer " + deployer);
/*     */   }
/*     */
/*     */   public boolean determineStructure(VirtualFile root, VirtualFile parent, VirtualFile file, StructureMetaData structureMetaData) throws DeploymentException
/*     */   {
/* 139 */     StructureMetaData structure = StructureMetaDataFactory.createStructureMetaData();
/* 140 */     boolean result = doDetermineStructure(root, parent, file, structure);
/* 141 */     if (result)
/*     */     {
/* 143 */       String relativePath = AbstractStructureDeployer.getRelativePath(parent, file);
/*     */
/* 146 */       ContextInfo recognised = structure.getContext("");
/* 147 */       if (recognised == null) {
/* 148 */         throw new IllegalStateException("Something recognised the deployment, but there is no context? " + file);
/*     */       }
/*     */
/* 152 */       List metaDataPath = recognised.getMetaDataPath();
View Full Code Here

/*     */
/*     */ public class DeploymentFactory
/*     */ {
/*     */   public ContextInfo addContext(PredeterminedManagedObjectAttachments context, String path)
/*     */   {
/*  55 */     StructureMetaData structure = assureStructure(context);
/*  56 */     ContextInfo result = StructureMetaDataFactory.createContextInfo(path);
/*  57 */     structure.addContext(result);
/*  58 */     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.