Package javax.enterprise.deploy.shared

Examples of javax.enterprise.deploy.shared.ModuleType


         jos = new JarOutputStream(fos, manifest);
      else jos = new JarOutputStream(fos);

      // process all modules
      TargetModuleInfo moduleInfo = new TargetModuleInfo();
      ModuleType moduleType = null;
      JarEntry entry = jis.getNextJarEntry();
      while (entry != null)
      {
         String entryName = entry.getName();
View Full Code Here


   /**
    * A simple module type determination taking only the descriptor name into account.
    */
   private static ModuleType determineModuleType(String entryName)
   {
      ModuleType moduleType = null;
      if (entryName.endsWith("/application.xml"))
      {
         moduleType = ModuleType.EAR;
      }
      else if (entryName.endsWith("/application-client.xml"))
View Full Code Here

      List<DeploymentContext> children = info.getChildren();
      for(DeploymentContext ctx : children)
      {
         try
         {
            ModuleType type = getModuleType(ctx);
            // Discard unknown ModuleTypes
            if (type != null)
            {
               String module = ctx.getName();
               // TODO, DEPLOYED may not be the same as running?
               boolean isRunning = ctx.getState() == DeploymentState.DEPLOYED;
               SerializableTargetModuleID child = new SerializableTargetModuleID(moduleID, module, type.getValue(), isRunning);
               moduleID.addChildTargetModuleID(child);
               fillChildrenTargetModuleID(child, ctx);
            }
         }
         catch (UnsupportedOperationException e)
View Full Code Here

    * @param info
    * @return
    */
   private ModuleType getModuleType(DeploymentContext info)
   {
      ModuleType type = null;
      DeploymentUnit unit = info.getDeploymentUnit();

      if (unit.getAttachment(carDeployerType) != null)
      {
         type = ModuleType.CAR;
View Full Code Here

         for (int n = 0; n < modules.length; n++)
         {
            SerializableTargetModuleID id = modules[n];
            String moduleID = id.getModuleID();
            boolean isRunning = id.isRunning();
            ModuleType type = ModuleType.getModuleType(id.getModuleType());
            TargetModuleIDImpl tmid = new TargetModuleIDImpl(this, moduleID, null, isRunning, type);
            convertChildren(tmid, id);
            list.add(tmid);
         }
View Full Code Here

      for (int n = 0; n < length; n++)
      {
         SerializableTargetModuleID id = children[n];
         String moduleID = id.getModuleID();
         boolean isRunning = id.isRunning();
         ModuleType type = ModuleType.getModuleType(id.getModuleType());
         TargetModuleIDImpl child = new TargetModuleIDImpl(this, moduleID, parent, isRunning, type);
         parent.addChildTargetModuleID(child);
         convertChildren(child, id);
      }
   }
View Full Code Here

        } catch (IllegalStateException e) {
            throw new DeploymentSyntaxException(e.getMessage(), e);
        }
       
        for (int i = 0; i < modules.length; i++) {
            ModuleType type = ((TargetModuleIDImpl)modules[i]).getType();
            if (type != null) {
                if (type.equals(ModuleType.WAR) || type.equals(ModuleType.EAR) || type.equals(ModuleType.EJB) || type.equals(ModuleType.RAR) || type.equals(ModuleType.CAR)) {
                    apps.add(((TargetModuleIDImpl)modules[i]).getModuleID());
                }
            }
        }
       
View Full Code Here

        } catch (IllegalStateException e) {
            throw new DeploymentSyntaxException(e.getMessage(), e);
        }

        for (int i = 0; i < modules.length; i++) {
            ModuleType type = ((TargetModuleIDImpl)modules[i]).getType();
            if (type != null) {
                if (type.equals(ModuleType.WAR) || type.equals(ModuleType.EAR) || type.equals(ModuleType.EJB) || type.equals(ModuleType.RAR) || type.equals(ModuleType.CAR)) {
                    apps.add(((TargetModuleIDImpl)modules[i]).getModuleID());
                }
            }
        }
View Full Code Here

                throw new IllegalStateException(MESSAGES.managementRequestFailed(result));

            List<ModelNode> nodeList = result.get(RESULT).asList();
            for (ModelNode node : nodeList) {
                String moduleID = node.asString();
                ModuleType moduleType = null;
                if (moduleID.endsWith(".ear")) {
                    moduleType = ModuleType.EAR;
                } else if (moduleID.endsWith(".war")) {
                    moduleType = ModuleType.WAR;
                } else if (moduleID.endsWith(".rar")) {
View Full Code Here

                jos = new JarOutputStream(fos, manifest);
            else
                jos = new JarOutputStream(fos);

            // process all modules
            ModuleType moduleType = null;
            JarEntry entry = jis.getNextJarEntry();
            while (entry != null) {
                String entryName = entry.getName();

                // only process file entries
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.shared.ModuleType

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.