Examples of VFSDeploymentUnit


Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

      if (filter != null && filter.accepts(unit) == false)
         return;

      if (module == null)
      {
         VFSDeploymentUnit parent = unit.getParent();
         while(parent != null && module == null)
         {
            module = parent.getAttachment(Module.class);
            parent = parent.getParent();
         }
         if (module == null)
            throw new IllegalArgumentException("No module in deployment unit's hierarchy: " + unit.getName());
      }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

      {
         String name = persistenceUnitDependencyResolver.createBeanName(unit, metaData.getName());
        
         InitialContext initialContext = new InitialContext();
         List<String> explicitEntityClasses = new ArrayList<String>();
         VFSDeploymentUnit deploymentUnit = (VFSDeploymentUnit) unit.getParent();
         PersistenceUnitDeployment pu = new PersistenceUnitDeployment(initialContext, null, explicitEntityClasses, metaData, name, deploymentUnit, defaultPersistenceProperties);
        
         AbstractBeanMetaData beanMetaData = new AbstractBeanMetaData(name, PersistenceUnitDeployment.class.getName());
         BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanMetaData);
         builder.setConstructorValue(pu);
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   {
      if (ignoreName(unit, name))
         return null;

      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, true);
      return (file != null) ? parseAndInit(vfsDeploymentUnit, file, root) : null;
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   protected T parse(DeploymentUnit unit, Set<String> names, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();
      Set<String> ignoredFiles = new HashSet<String>();
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

      // The infrastructure will only check leafs anyway so no need to check here
      if (name == null && isIncludeDeploymentFile())
         name = unit.getName();

      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      // let's check altDD first
      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, false);
      if (file != null)
         return parseAndInit(vfsDeploymentUnit, file, root, true);

      // try all name+suffix matches
      List<VirtualFile> files = vfsDeploymentUnit.getMetaDataFiles(name, suffix, getMetaDataTypeFilter(unit));
      switch (files.size())
      {
         case 0 :
            return null;
         case 1 :
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   protected T parse(DeploymentUnit unit, Set<String> names, String suffix, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();
      Set<String> ignoredFiles = new HashSet<String>();

      for (String name : names)
      {
         if (ignoreName(unit, name))
         {
            ignoredFiles.add(name);
         }
         else
         {
            // try finding altDD file
            VirtualFile file = getMetadataFile(vfsDeploymentUnit, matchFileToClass(unit, name), name, false);
            if (file == null)
            {
               List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix, getMetaDataTypeFilter(unit));
               if (matched != null && matched.isEmpty() == false)
                  files.addAll(matched);
               else
                  missingFiles.add(name);
            }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

     
      // This part of the deployment wants its own classloader
      if (unit != initial && unit.getAttachment(ClassLoadingMetaData.class) != null)
         return;
     
      VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
      List<VirtualFile> paths = vfsUnit.getClassPath();
      if (paths != null)
         classPath.addAll(paths);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   public void deploy(DeploymentUnit unit) throws DeploymentException
   {
      if (unit instanceof VFSDeploymentUnit == false)
         return;
     
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;
      deploy(vfsDeploymentUnit);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   {
      if (ignoreName(unit, name))
         return null;

      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, true);
      return (file != null && ignoreFile(vfsDeploymentUnit, file) == false) ? parseAndInit(vfsDeploymentUnit, file, root) : null;
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   protected T parse(DeploymentUnit unit, Set<String> names, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();
      Set<String> ignoredFiles = new HashSet<String>();
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.