Examples of Command


Examples of org.apache.karaf.shell.api.action.Command

            if (reg == null ) {
                throw new IllegalArgumentException("Class " + clazz.getName() + " is not annotated with @Service");
            }
        }
        if (Action.class.isAssignableFrom(clazz)) {
            final Command cmd = clazz.getAnnotation(Command.class);
            if (cmd == null) {
                throw new IllegalArgumentException("Command " + clazz.getName() + " is not annotated with @Command");
            }
            Object command = new ActionCommand(this, (Class<? extends Action>) clazz);
            registrations.register(command);
View Full Code Here

Examples of org.apache.karaf.shell.api.console.Command

    @Override
    public void register(Object service) {
        synchronized (services) {
            if (service instanceof Command) {
                Command command = (Command) service;
                String scope = command.getScope();
                String name = command.getName();
                if (!Session.SCOPE_GLOBAL.equals(scope)) {
                    if (!subshells.containsKey(scope)) {
                        SubShellCommand subShell = new SubShellCommand(scope);
                        subshells.put(scope, subShell);
                        register(subShell);
View Full Code Here

Examples of org.apache.karaf.shell.commands.Command

    @Override
    public void printHelp(Action action, ActionMetaData actionMeta, PrintStream out, boolean includeHelpOption) {
        Map<Option, Field> optionsMap = actionMeta.getOptions();
        Map<Argument, Field> argsMap = actionMeta.getArguments();
        Command command = actionMeta.getCommand();
        List<Argument> arguments = new ArrayList<Argument>(argsMap.keySet());
        Collections.sort(arguments, new Comparator<Argument>() {
            public int compare(Argument o1, Argument o2) {
                return Integer.valueOf(o1.index()).compareTo(Integer.valueOf(o2.index()));
            }
        });
        Set<Option> options = new HashSet<Option>(optionsMap.keySet());
        if (includeHelpOption)
            options.add(HelpOption.HELP);

        out.println("h1. " + command.scope() + ":" + command.name());
        out.println();

        out.println("h2. Description");
        out.println(command.description());
        out.println();

        StringBuffer syntax = new StringBuffer();
        syntax.append(String.format("%s:%s", command.scope(), command.name()));
        if (options.size() > 0) {
            syntax.append(" \\[options\\]");
        }
        if (arguments.size() > 0) {
            syntax.append(' ');
View Full Code Here

Examples of org.apache.maven.scm.command.Command

        parameters.setString( CommandParameter.MESSAGE, message == null ? "" : message );

        parameters.setString( CommandParameter.BINARY, "false" );

        // just invoke add command
        Command cmd = getAddCommand();
        cmd.setLogger( getLogger() );

        ScmResult addResult = cmd.execute( repository, fileSet, parameters );

        if ( !addResult.isSuccess() )
        {
            return new MkdirScmResult( addResult.getCommandLine().toString(), "The cvs command failed.",
                                       addResult.getCommandOutput(), false );
View Full Code Here

Examples of org.apache.myfaces.tobago.renderkit.html.Command

      if (command.getFacet(Facets.RADIO) != null) {
        return renderSelectOne(facesContext, toolBar, command, writer, width);
      } else if (command.getFacet(Facets.CHECKBOX) != null) {
        return renderSelectBoolean(facesContext, toolBar, command, writer, width);
      } else {
        final CommandMap map = new CommandMap(new Command(facesContext, command));
        return renderToolbarButton(
            facesContext, toolBar, command, writer, false, width, map, null);
      }
    }
  }
View Full Code Here

Examples of org.apache.poi.hdgf.chunks.Chunk.Command

        if(chunk != null &&
            chunk.getName() != null &&
            chunk.getName().equals("Text") &&
            chunk.getCommands().length > 0) {
          // First command
          Command cmd = chunk.getCommands()[0];
          if(cmd != null && cmd.getValue() != null) {
            text.add( cmd.getValue().toString() );
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.qpid.disttest.message.Command

        }
    }

    public void sendRegistrationMessage()
    {
        Command command;
        try
        {
            command = new RegisterClientCommand(_clientName, _instructionQueue.getQueueName());
        }
        catch (final JMSException e)
View Full Code Here

Examples of org.apache.qpid.tools.messagestore.commands.Command

            return;
        }

        final String command = args[0];

        Command cmd = _commands.get(command);

        if (cmd == null)
        {
            _console.println("Command not understood: " + command);
        }
        else
        {
            cmd.execute(args);
        }
    }
View Full Code Here

Examples of org.apache.sshd.server.Command

    sshd.setShellFactory(new Factory<Command>() {

      @Override
      public Command create() {

        return new Command() {

          private InputStream in;
          private OutputStream out;
          private Shell shell;
          private ExitCallback ec;
View Full Code Here

Examples of org.apache.tools.ant.gui.command.Command

     * @return Command associated with action, or null if none available.
     */
    public Command getActionCommand(String actionID,
    AppContext context,
    EventObject event) {
        Command retval = null;
        AntAction action = (AntAction) _actions.get(actionID);
        if(action != null) {
            Class clazz = action.getCommandClass();
            if(clazz != null) {
                try {
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.