Examples of addCommand()


Examples of org.apache.karaf.shell.commands.Context.addCommand()

        Context context = new Context();
        context.set("SCOPE", "*");
        context.set(SessionProperties.COMPLETION_MODE, "subshell");
        CommandSessionHolder.setSession(context.getSession());

        context.addCommand("*", new SimpleSubShell("foo"), "foo");
        context.addCommand("*", new SimpleCommand(ExitAction.class), "exit");
        context.addCommand("foo", new SimpleCommand(MyAction.class), "my-action");
        context.addCommand("foo", new SimpleCommand(MyActionTwoArguments.class), "one-action");
        context.addCommand("bar", new SimpleCommand(MyAction.class), "one-action");
        context.addCommand("bar", new SimpleCommand(MyActionTwoArguments.class), "another");
View Full Code Here

Examples of org.apache.karaf.shell.commands.basic.Context.addCommand()

        Context context = new Context();
        context.set("SCOPE", "*");
        context.set(SessionProperties.COMPLETION_MODE, "subshell");
        CommandSessionHolder.setSession(context.getSession());

        context.addCommand("*", new SimpleSubShell("foo"), "foo");
        context.addCommand("*", new SimpleCommand(ExitAction.class), "exit");
        context.addCommand("foo", new SimpleCommand(MyAction.class), "my-action");
        context.addCommand("foo", new SimpleCommand(MyActionTwoArguments.class), "one-action");
        context.addCommand("bar", new SimpleCommand(MyAction.class), "one-action");
        context.addCommand("bar", new SimpleCommand(MyActionTwoArguments.class), "another");
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.html.CommandMap.addCommand()

          && (facetComponent instanceof AbstractUICommand || facetComponent instanceof UIForm)) {
        if (commandMap == null) {
          commandMap = new CommandMap();
        }
        String key = entry.getKey();
        commandMap.addCommand(key, new Command(facesContext, entry.getValue(), id));
      }
    }
    if (commandMap != null) {
      writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(commandMap), true);
    }
View Full Code Here

Examples of org.apache.oozie.cli.CLIParser.addCommand()

            throw new IllegalStateException("CLI instance already used");
        }
        used = true;

        CLIParser parser = new CLIParser("ooziedb.sh", HELP_INFO);
        parser.addCommand(HELP_CMD, "", "display usage", new Options(), false);
        parser.addCommand(VERSION_CMD, "", "show Oozie DB version information", new Options(), false);
        parser.addCommand(CREATE_CMD, "", "create Oozie DB schema", createUpgradeOptions(), false);
        parser.addCommand(UPGRADE_CMD, "", "upgrade Oozie DB", createUpgradeOptions(), false);
        parser.addCommand(POST_UPGRADE_CMD, "", "post upgrade Oozie DB", createUpgradeOptions(), false);
View Full Code Here

Examples of org.asteriskjava.manager.action.UpdateConfigAction.addCommand()

        UpdateConfigAction action;
        action = new UpdateConfigAction();
        action.setSrcFilename("sourcefile.conf");
        action.setDstFilename("destfile.conf");
        action.setReload(true);
        action.addCommand(UpdateConfigAction.ACTION_NEWCAT, "testcategory", null, null, null);

        String actual = actionBuilder.buildAction(action);
       
        assertTrue("Action name missing", actual.indexOf("action: UpdateConfig") >= 0);
        assertTrue("Source filename missing", actual.indexOf("srcfilename: sourcefile.conf") >= 0);
View Full Code Here

Examples of org.drools.guvnor.shared.simulation.SimulationStepModel.addCommand()

    }

    public void addCommand(AbstractCommandModel command) {
        SimulationStepModel step = command.getStep();
        SimulationPathModel path = step.getPath();
        step.addCommand(command);
        pathWidgetMap.get(path).addedCommand(command);
        // TODO notify timeLineWidget in case the step icon needs to change
    }

    public void moveUpCommand(AbstractCommandModel command) {
View Full Code Here

Examples of org.eclipse.jgit.lib.BatchRefUpdate.addCommand()

    BatchRefUpdate batch = db.getRefDatabase().newBatchUpdate();
    batch.setAllowNonFastForwards(isAllowNonFastForwards());
    batch.setRefLogIdent(getRefLogIdent());
    batch.setRefLogMessage("push", true);
    batch.addCommand(toApply);
    try {
      batch.execute(walk, updating);
    } catch (IOException err) {
      for (ReceiveCommand cmd : toApply) {
        if (cmd.getResult() == Result.NOT_ATTEMPTED)
View Full Code Here

Examples of org.exist.versioning.svn.internal.wc.admin.SVNLog.addCommand()

        if (entry.isScheduledForReplacement()) {
            revertBase = true;
            baseProperties = dir.getRevertProperties(name);
            String propRevertPath = SVNAdminUtil.getPropRevertPath(name, entry.getKind(), false);
            command.put(SVNLog.NAME_ATTR, propRevertPath);
            log.addCommand(SVNLog.DELETE, command, false);
            command.clear();
            reverted = true;
        }
        boolean reinstallWorkingFile = false;
        if (baseProperties == null) {
View Full Code Here

Examples of org.impalaframework.interactive.command.InteractiveTestCommand.addCommand()

        InteractiveTestCommand command = getCommand();
        Map<String, Command> commandMap = getCommandMap();
        Set<String> commandKeys = commandMap.keySet();
       
        for (String commandKey : commandKeys) {
            command.addCommand(commandKey, commandMap.get(commandKey));
        }

        // now need to capture
        CommandState commandState = new CommandState();
View Full Code Here

Examples of org.infinispan.cli.CommandBuffer.addCommand()

   }

   @Override
   public void execute(Context context, ProcessedCommand commandLine) {
      CommandBuffer commandBuffer = new CommandBufferImpl();
      commandBuffer.addCommand(getName(), nesting());
      context.getConnection().execute(context, commandBuffer);
   }
}
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.