Examples of ModuleInfo


Examples of gri.gridp.modules.ModuleInfo

    for (int i = 0; i < children.size(); i++) {
      Element child = (Element)children.get(i);
      String name = child.getName().toLowerCase();

      if (name.equals("info")) {
        ModuleInfo info = modInfoSerializer.readModuleInfo(child);
        if (info != null)
          module.setModuleInfo(info);
      }

      else if (name.equals("parameters")) {
        List parameters = paramSerializer.readList(child);
        for (int j = 0; j < parameters.size(); j++) {
          Parameter param = (Parameter)parameters.get(j);
          module.addParameter(param);
        }
      }

      else if (name.equals("outputs")) {
        List outputs = new ListSerializer(outputSerializer, "output").readList(child);
        for (int j=0; j<outputs.size(); j++)
          module.addOutput((Output)outputs.get(j));
      }

      else if (name.equals("functions")) {
        ListSerializer serializer = new ListSerializer(
            new FunctionSerializer(
                module.getParameterMap(), module.getOutputMap()),
        "function");
        List functions = serializer.readList(child);
        for (int functionIndex=0; functionIndex<functions.size(); functionIndex++) {
          Function function = (Function)functions.get(functionIndex);   
          module.addFunction(function);
        }
      }

      /*
      else if (name.equals("function")) {
    Function f = new FunctionSerializer(module.getParameterMap()).readFunction(elem);
    if (f != null)
        module.addFunction(f);
      }*/

    }

    //validate:
    if (module.getModuleInfo() == null)
      module.setModuleInfo(new ModuleInfo("unknown program"));

    //name functions:
    List functions = module.getFunctionList();
    Function func;
    for (int i=0; i<functions.size(); i++) {
View Full Code Here

Examples of gri.gridp.modules.ModuleInfo

    }
 
  protected TaskDescription getTaskDescription(ModuleFunction modFunc) {
    ProgramTaskDescription desc = new ProgramTaskDescription();

    ModuleInfo modInfo = modFunc.getModule().getModuleInfo();
    FunctionInfo funcInfo = modFunc.getFunction().getInfo();

    //custom name:
    String name = funcInfo.getTitle();
   
    //default name = "module (program)"
    if (name == null) {
      name = modInfo.getTitle();

      String program = modInfo.getProgram();
      if (program != null)
        name += " (" + program + ")";   
    }

    desc.setName(name);

    //description:
    String description = funcInfo.getDescription();
    if (description == null)
      description = modInfo.getDescription();
    desc.setDescription(description);

    //extended info:
    desc.setProgramName(modInfo.getProgram());
    desc.setGroup(funcInfo.getGroup());

    PackageInfo pkgInfo = modInfo.getPackageInfo();
    if (pkgInfo != null) {
      desc.setPackageName(pkgInfo.getName());
      desc.setWebsite(pkgInfo.getWebsite());
    }
View Full Code Here

Examples of net.kuujo.vertigo.platform.ModuleInfo

  /**
   * Loads configuration information for a module from mod.json.
   */
  private ModuleInfo loadModuleInfo(ModuleIdentifier modID, File modJsonFile) {
    return new ModuleInfo(modID, new ModuleFields(loadModuleConfig(modID, modJsonFile)));
  }
View Full Code Here

Examples of net.kuujo.vertigo.platform.ModuleInfo

   * Pulls in all dependencies for a module.
   */
  private void pullInDependencies(ModuleIdentifier modID, File modDir) {
    // Load the module configuration file.
    File modJsonFile = new File(modDir, MOD_JSON_FILE);
    ModuleInfo info = loadModuleInfo(modID, modJsonFile);

    // Pull in all dependencies according to the "includes" and "deploys" fields.
    ModuleFields fields = info.fields();
    List<String> mods = new ArrayList<>();

    // Add "includes" modules.
    String sincludes = fields.getIncludes();
    if (sincludes != null) {
View Full Code Here

Examples of net.kuujo.vertigo.platform.ModuleInfo

      @Override
      public void handle(AsyncResult<ModuleInfo> result) {
        if (result.failed()) {
          assertTrue(result.cause().getMessage(), result.succeeded());
        } else {
          ModuleInfo info = result.result();
          assertEquals("net.kuujo~test-mod-1~1.0", info.id().toString());
          assertEquals("app.js", info.fields().getMain());
          assertEquals("net.kuujo~test-include-1~1.0", info.fields().getIncludes());
          assertEquals("net.kuujo~test-include-2~1.0", info.fields().getDeploys());
          assertEquals("in", info.fields().getInPorts().get(0));
          assertEquals("out", info.fields().getOutPorts().get(0));
          testComplete();
        }
      }
    });
  }
View Full Code Here

Examples of org.glassfish.internal.data.ModuleInfo

    private class AppDeployEventListener implements EventListener {

        public void event(Event event) {
            Application app = null;
            if (Deployment.MODULE_LOADED.equals(event.type())) {
                ModuleInfo moduleInfo = (ModuleInfo) event.hook();
                if (moduleInfo instanceof ApplicationInfo) {
                    return;
                }
                WebBundleDescriptor webBD =
                        (WebBundleDescriptor) moduleInfo.getMetaData(
                                "org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl");
                loadPolicy(webBD, false);
            } else if (Deployment.APPLICATION_LOADED.equals(event.type())) {
                ApplicationInfo appInfo = (ApplicationInfo) event.hook();
                app = appInfo.getMetaData(Application.class);
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleInfo

            }
            String source = _wojCache.getSource(md5, className);
            if(source != null) {
                return source.toCharArray();
            }
            ModuleInfo moduleInfo = getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException(jarPath);
            }
            source = WojServicesAccess.INSTANCE.getSource(moduleInfo, className, null);
            if(source == null || source.length()==0) {
                throw new WojException(Messages.getString("common.nosource.messsage",new Object[]{className, moduleInfo})); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleInfo

            }
            File file = _wojCache.getSourceFile(md5, className);
            if(file != null) {
                return file;
            }
            ModuleInfo moduleInfo = getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException(jarPath);
            }
            String source = WojServicesAccess.INSTANCE.getSource(moduleInfo, className, null);
            if(source == null || source.length()==0) {
                throw new WojException(Messages.getString("common.nosource.messsage",new Object[]{className, moduleInfo})); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleInfo

            }
            URL url = _wojCache.getSourceURL(md5, className);
            if(url != null) {
                return url;
            }
            ModuleInfo moduleInfo = getModuleInfo(jarPath);
            if(moduleInfo == null || !moduleInfo.isKnown()) {
                throw new WojModuleNotFoundException(jarPath);
            }
            String source = WojServicesAccess.INSTANCE.getSource(moduleInfo, className, null);
            if(source == null || source.length()==0) {
                throw new WojException(Messages.getString("common.nosource.messsage",new Object[]{className, moduleInfo})); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.jayasoft.woj.common.model.content.ModuleInfo

        String jarMd5 = computeMD5(jarPath);
        if(jarMd5 == null) {
            return null;
        }
        LOGGER.debug("jarMd5:"+jarMd5); //$NON-NLS-1$
        ModuleInfo info = _wojCache.getModuleInfo(jarMd5);
        if(info != null && info.isKnown()) {
          LOGGER.debug("found in cache:"+info); //$NON-NLS-1$
            return info;
        }
        LOGGER.debug("ask woj server"); //$NON-NLS-1$
        info = WojServicesAccess.INSTANCE.getModuleInfo(jarMd5);
        LOGGER.debug("woj server respond :"+info); //$NON-NLS-1$
        if(info != null) {
            _wojCache.putModuleInfo(jarMd5, info);
        }
        if(info == null || !info.isKnown()) {
          LOGGER.debug("woj server do not kown this jar looking for local association."); //$NON-NLS-1$
          info = _localAsso.getLocalAssociation(jarMd5);
          LOGGER.debug("local asso:"+info); //$NON-NLS-1$
        }
        return info;
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.