Examples of InfoCommand


Examples of org.apache.stratos.cli.commands.InfoCommand

    commands.put(command.getName(), command);
   
    command = new ListCommand();
    commands.put(command.getName(), command);
   
    command = new InfoCommand();
    commands.put(command.getName(), command);
   
    command = new AddDomainMappingCommand();
    commands.put(command.getName(), command);
   
View Full Code Here

Examples of org.eclim.installer.step.command.InfoCommand

    throws Exception
  {
    final Map<String,Feature> installedFeatures = new HashMap<String,Feature>();

    // run eclipse to get a list of existing installed features
    Command command = new InfoCommand(new OutputHandler(){
      public void process(String line){
        logger.info(line);
        if(line.startsWith(FEATURE)){
          String[] attrs = StringUtils.split(line.substring(FEATURE.length()));
          File site = null;
          try{
            site = new File(new URL(attrs[2]).getFile());
          }catch(Exception e){
            logger.error("Failed to parse feature: " + line, e);
          }
          installedFeatures.put(attrs[0], new Feature(attrs[1], site));
        }else if(line.startsWith(CONFIGURATION)){
          String config = line.substring(CONFIGURATION.length());
          if (config.startsWith("file:")){
            config = config.substring(5);
          }
          if(Os.isFamily(Os.FAMILY_WINDOWS) && config.startsWith("/")){
            config = config.substring(1);
          }
          String local = new File(config).getParent();
          logger.info("eclipse.local=" + local);
          Installer.getContext().setValue("eclipse.local", local);
        }else if(line.startsWith(PROFILE)){
          String profile = line.substring(PROFILE.length());
          logger.info("eclipse.profile=" + profile);
          Installer.getContext().setValue("eclipse.profile", profile);
        }
      }
    });
    try{
      command.start();
      command.join();
      if(command.getReturnCode() != 0){
        if (command.isShutdown()){
          return null;
        }
        throw new RuntimeException(
            "error: " + command.getErrorMessage() +
            " out: " + command.getResult());
      }
    }finally{
      command.destroy();
    }

    return new EclipseInfo(
        (String)Installer.getContext().getValue("eclipse.profile"),
        (String)Installer.getContext().getValue("eclipse.local"),
View Full Code Here

Examples of org.kitesdk.cli.commands.InfoCommand

    jc.addCommand("copy", new CopyCommand(console));
    jc.addCommand("transform", new TransformCommand(console));
    jc.addCommand("update", new UpdateDatasetCommand(console));
    jc.addCommand("delete", new DeleteDatasetCommand(console));
    jc.addCommand("schema", new SchemaCommand(console));
    jc.addCommand("info", new InfoCommand(console));
    jc.addCommand("show", new ShowRecordsCommand(console));
    jc.addCommand("csv-schema", new CSVSchemaCommand(console));
    jc.addCommand("csv-import", new CSVImportCommand(console));
    jc.addCommand("obj-schema", new ObjectSchemaCommand(console));
    jc.addCommand("partition-config", new CreatePartitionStrategyCommand(console));
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.