Examples of MutableAttachments


Examples of org.jboss.deployers.spi.attachments.MutableAttachments

      if (scriptName == null)
         throw new IllegalArgumentException("Null script name.");

      BeanShellScript script = createBeanShellScript(bshScript, scriptName);
      Deployment deployment = new AbstractDeployment(scriptName);
      MutableAttachments mutableAttachments = ((MutableAttachments)deployment.getPredeterminedManagedObjects());
      mutableAttachments.addAttachment(BeanShellScript.class, script);

      deployer.addDeployment(deployment);
      deployer.process();

      return deployment.getName();
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

            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

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

   protected static StructureMetaData assureStructure(PredeterminedManagedObjectAttachments context)
   {
      if (context == null)
         throw new IllegalArgumentException("Null context");

      MutableAttachments mutable;
     
      Attachments attachments = context.getPredeterminedManagedObjects();

      // Nothing predetermined yet
      if (attachments == null)
      {
         mutable = AttachmentsFactory.createMutableAttachments();
         context.setPredeterminedManagedObjects(mutable);
      }
      // Some predetermined but needs to be made mutable
      else if (attachments instanceof MutableAttachments == false)
      {
         mutable = AttachmentsFactory.createMutableAttachments();
         Map<String, Object> map = attachments.getAttachments();
         if (map != null)
            mutable.setAttachments(map);
         context.setPredeterminedManagedObjects(mutable);
      }
      else
      {
         mutable = (MutableAttachments) attachments;
      }
     
      StructureMetaData structure = mutable.getAttachment(StructureMetaData.class);
      // No previous structure
      if (structure == null)
      {
         structure = StructureMetaDataFactory.createStructureMetaData();
         mutable.addAttachment(StructureMetaData.class, structure);
      }
      return structure;
   }
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

         // 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

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

      try
      {
         webMetaDataModifier.modifyMetaData(dep);

         AbstractDeployment deployment = createSimpleDeployment(dep.getSimpleName());
         MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
         mutableAttachments.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
         mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory());
         mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
         mainDeployer.deploy(deployment);
      }
      catch (Exception ex)
      {
         WSFDeploymentException.rethrow(ex);
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

   protected static StructureMetaData assureStructure(PredeterminedManagedObjectAttachments context)
   {
      if (context == null)
         throw new IllegalArgumentException("Null context");

      MutableAttachments mutable;
     
      Attachments attachments = context.getPredeterminedManagedObjects();

      // Nothing predetermined yet
      if (attachments == null)
      {
         mutable = AttachmentsFactory.createMutableAttachments();;
         context.setPredeterminedManagedObjects(mutable);
      }
      // Some predetermined but needs to be made mutable
      else if (attachments instanceof MutableAttachments == false)
      {
         mutable = AttachmentsFactory.createMutableAttachments();
         Map<String, Object> map = attachments.getAttachments();
         if (map != null)
            mutable.setAttachments(map);
         context.setPredeterminedManagedObjects(mutable);
      }
      else
      {
         mutable = (MutableAttachments) attachments;
      }
     
      StructureMetaData structure = mutable.getAttachment(StructureMetaData.class);
      // No previous structure
      if (structure == null)
      {
         structure = StructureMetaDataFactory.createStructureMetaData();
         mutable.addAttachment(StructureMetaData.class, structure);
      }
      return structure;
   }
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

      {
         webMetaDataModifier.modifyMetaData(dep);

         String contextRoot = dep.getService().getContextRoot();
         AbstractDeployment deployment = createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
         MutableAttachments mutableAttachments = (MutableAttachments)deployment.getPredeterminedManagedObjects();
         mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
         mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
         mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(epLoader));
         mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
         mutableAttachments.addAttachment(Module.class, ClassLoading.getModuleForClassLoader(epLoader));
         mainDeployer.deploy(deployment);
        
         deployments.put(contextRoot, deployment);
      }
      catch (Exception ex)
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

            parentContext = StructureMetaDataFactory.createContextInfo(relativePath, recognised.getClassPath());
         else
            parentContext = StructureMetaDataFactory.createContextInfo(relativePath, metaDataPath, recognised.getClassPath());
        
         structureMetaData.addContext(parentContext);
         MutableAttachments attachments = (MutableAttachments) parentContext.getPredeterminedManagedObjects();
         attachments.addAttachment(StructureMetaData.class, structure);
      }
      return result;
   }
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

   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, "");
      return deployment;
   }
View Full Code Here

Examples of org.jboss.deployers.spi.attachments.MutableAttachments

   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();
      factory.addContext(deployment, "");
      return deployment;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.