Package org.impalaframework.command.framework

Examples of org.impalaframework.command.framework.CommandPropertyValue


    Assert.notNull(moduleLocationResolver, "moduleLocationResolver cannot be null");
    this.moduleLocationResolver = moduleLocationResolver;
  }

  public boolean execute(CommandState commandState) {
    CommandPropertyValue suppliedValue = commandState.getProperties().get(DIRECTORY_NAME);
   
    //we can call this because the getCommandDefinition contract demands this
    Assert.notNull(suppliedValue);

    String candidateValue = suppliedValue.getValue();

    List<Resource> locations = moduleLocationResolver.getApplicationModuleClassLocations(candidateValue);

    boolean exists = false;
View Full Code Here


  }

  public void extractText(String[] text, CommandState commandState) {

    if (text.length > 0) {
      commandState.addProperty(DIRECTORY_NAME, new CommandPropertyValue(text[0]));
    }

  }
View Full Code Here

      RootModuleDefinition md;
      try {
        md = Impala.getRootModuleDefinition();
        return md.getRootProjectNames();
      } catch (NoServiceException e) {
        CommandPropertyValue property = GlobalCommandState.getInstance().getProperty(CommandStateConstants.DEBUG_MODE);
        if (property != null && "true".equalsIgnoreCase(property.getValue())) {
          e.printStackTrace();
        }
      }   
      return Collections.emptyList();
    }
View Full Code Here

        return reload(commandState);
    }

    private boolean reload(CommandState commandState) {
       
        CommandPropertyValue commandPropertyValue = commandState.getProperties().get(MODULE_NAME);

        if (commandPropertyValue != null) {
            String moduleName = commandPropertyValue.getValue();
            reloadModule(moduleName, commandState);
            return true;
        } else {
            reloadRootModule();
            return true;
View Full Code Here

            actualModule = moduleToReload;
        }
        watch.stop();

        if (moduleToReload != null)
            commandState.addProperty(ACTUAL_MODULE_RELOADED, new CommandPropertyValue(moduleToReload));
        InteractiveCommandUtils.printReloadInfo(moduleToReload, actualModule, watch);
    }
View Full Code Here

    public void extractText(String[] text, CommandState commandState) {
        String name = text[0];
        if (name != null) {
            commandState.addProperty(MODULE_NAME,
                    new CommandPropertyValue(name.trim(), "Module name"));
        }
    }
View Full Code Here

        Assert.notNull(moduleLocationResolver, "moduleLocationResolver cannot be null");
        this.moduleLocationResolver = moduleLocationResolver;
    }

    public boolean execute(CommandState commandState) {
        CommandPropertyValue suppliedValue = commandState.getProperties().get(DIRECTORY_NAME);
       
        //we can call this because the getCommandDefinition contract demands this
        Assert.notNull(suppliedValue);

        String candidateValue = suppliedValue.getValue();

        List<Resource> locations = moduleLocationResolver.getApplicationModuleClassLocations(candidateValue);

        boolean exists = false;
View Full Code Here

    }

    public void extractText(String[] text, CommandState commandState) {

        if (text.length > 0) {
            commandState.addProperty(DIRECTORY_NAME, new CommandPropertyValue(text[0]));
        }

    }
View Full Code Here

    public boolean execute(CommandState commandState) {

        Assert.notNull(classDirectories);

        Map<String, CommandPropertyValue> properties = commandState.getProperties();
        CommandPropertyValue classHolder = properties.get("class");

        String searchText = classHolder.getValue();

        ClassFindFileRecurseHandler handler = new ClassFindFileRecurseHandler(searchText);
        FileRecurser recurser = new FileRecurser();

        for (File directory : classDirectories) {
View Full Code Here

    private Map<String, String> aliasMap = new HashMap<String, String>();
    private List<TestCommandListener> listeners = new ArrayList<TestCommandListener>();
   
    public boolean execute(CommandState commandState) {
       
        CommandPropertyValue fullCommandText = commandState.getProperties().get(CommandStateConstants.COMMAND_TEXT);
        GlobalCommandState.getInstance().addProperty(CommandStateConstants.LAST_COMMAND, fullCommandText);
       
        String commandText = fullCommandText.getValue();
        String[] commandTerms = commandText.split(" ");
        String[] extraTerms = new String[commandTerms.length -1];
       
        if (commandTerms.length > 1) {
            System.arraycopy(commandTerms, 1, extraTerms, 0, extraTerms.length);
View Full Code Here

TOP

Related Classes of org.impalaframework.command.framework.CommandPropertyValue

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.