Examples of AbstractCommand


Examples of com.apress.progwt.client.domain.commands.AbstractCommand

                        + " " + application.getPros().size());
                bindFields();
                Log.debug("CollegeEntry.af " + application.getNotes()
                        + " " + application.getPros().size());

                AbstractCommand command = new SaveApplicationCommand(
                        application);
                serviceCache.executeCommand(command,
                        new StdAsyncCallback<SiteCommand>("Save") {
                        });
            }
View Full Code Here

Examples of com.sun.grid.jgdi.util.shell.AbstractCommand

     * @param cls Annotated class child of AbstractCommand
     * @throws java.lang.Exception
     */
    @SuppressWarnings(value = "unchecked")
    private void addAnnotatedCommand(Class cls) throws Exception {
        AbstractCommand cmd = null;
        CommandAnnotation ca = (CommandAnnotation) cls.getAnnotation(CommandAnnotation.class);
        if (AbstractCommand.class.isAssignableFrom(cls)) {

            cmdMap.put(ca.value(), cls);
            if (AnnotatedCommand.class.isAssignableFrom(cls)) {
View Full Code Here

Examples of com.sun.grid.jgdi.util.shell.AbstractCommand

    private AbstractCommand getCommand(String name) throws Exception {
        Class<? extends AbstractCommand> cls = cmdMap.get(name);
        if (cls == null) {
            return null;
        }
        AbstractCommand cmd = null;
        //If JGDIShell inner class
        if (cls.getName().contains(".JGDIShell$")) {
            Constructor c = cls.getConstructor(new Class[]{JGDIShell.class});
            cmd = (AbstractCommand) c.newInstance(new Object[]{this});
        } else {
View Full Code Here

Examples of com.sun.grid.jgdi.util.shell.AbstractCommand

                } catch (IndexOutOfBoundsException ioob) {
                    throw new IllegalArgumentException("command with id " + id + " not found in history");
                }
            }
            ParsedLine parsedLine = new ParsedLine(line);
            AbstractCommand cmd = getCommand(parsedLine.cmd);
            if (cmd == null) {
                exitCode = runShellCommand(line);
                return exitCode;
            }

            if (historyList.size() > maxHistory) {
                historyList.remove(0);
            }
            historyList.add(new HistoryElement(++historyIndex, line));

            cmd.init(this);
            cmd.run(parsedLine.args);
            return cmd.getExitCode();
        } catch (AbortException expected) {
            exitCode = 0;
        } catch (JGDIException ex) {
            err.println(ex.getMessage());
            logger.info("Command failed: " + ex.getMessage());
View Full Code Here

Examples of com.sun.grid.jgdi.util.shell.AbstractCommand

                    for (String cmd : cmdMap.keySet()) {
                        out.println(cmd);
                    }
                    break;
                case 1:
                    AbstractCommand cmd = getCommand(args[0]);
                    if (cmd == null) {
                        out.println("command " + args[0] + " not found");
                        return;
                    }
                    out.println(cmd.getUsage());
                    break;
                default:
                    out.println(getUsage());
            }
        }
View Full Code Here

Examples of de.kopis.glacier.commands.AbstractCommand

        CommandFactory.add(new UploadMultipartArchiveCommand(endpoint, credentials));
        CommandFactory.add(new AbortMultipartArchiveUploadCommand(endpoint, credentials));
      }

      // Find a valid one
      AbstractCommand command = CommandFactory.get(options, optionParser);

      // Execute it
      command.exec(options, optionParser);

    } catch (final IOException e) {
      log.error("Ooops, something is wrong with the system configuration", e);
    }
  }
View Full Code Here

Examples of jug.client.command.api.AbstractCommand

                recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
                recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
                recipe.allow(Option.NAMED_PARAMETERS);

                try {
                    final AbstractCommand cmdInstance = (AbstractCommand) recipe.create();
                    cmdInstance.execute(line);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                System.err.println("sorry i don't understand '" + line + "'");
View Full Code Here

Examples of jug.client.command.api.AbstractCommand

                recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
                recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
                recipe.allow(Option.NAMED_PARAMETERS);

                try {
                    final AbstractCommand cmdInstance = (AbstractCommand) recipe.create();
                    cmdInstance.execute(line);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                System.err.println("sorry i don't understand '" + line + "'");
View Full Code Here

Examples of net.java.trueupdate.manager.spec.cmd.AbstractCommand

                            @Override CommandId commandId() { return id; }
                        });
            }

            Command undeploy(final Command cmd) {
                return new AbstractCommand() {

                    @Override protected void doStart() throws Exception {
                        onStartUndeployment();
                    }
View Full Code Here

Examples of org.apache.felix.gogo.commands.basic.AbstractCommand

            while (line != null) {
                line = line.trim();
                if (line.length() > 0 && line.charAt(0) != '#') {
                    final Class<Action> actionClass = (Class<Action>) cl.loadClass(line);
                    Command cmd = actionClass.getAnnotation(Command.class);
                    Function function = new AbstractCommand() {
                        @Override
                        public Action createNewAction() {
                            try {
                                return ((Class<? extends Action>) actionClass).newInstance();
                            } catch (InstantiationException e) {
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.