Examples of Command


Examples of org.jboss.errai.bus.server.annotations.Command

      }

      Map<String, Method> commandPoints = new HashMap<String, Method>();
      for (final Method method : loadClass.getDeclaredMethods()) {
        if (method.isAnnotationPresent(Command.class)) {
          Command command = method.getAnnotation(Command.class);
          for (String cmdName : command.value()) {
            if (cmdName.equals("")) cmdName = method.getName();
            commandPoints.put(cmdName, method);
          }
        }
      }
View Full Code Here

Examples of org.jboss.forge.addon.ui.annotation.Command

         // Class may not be loaded yet
         logger.log(Level.SEVERE, "Error while finding " + method.getDeclaringClass() + " as a service");
         return null;
      }
      Object instance = service.get();
      Command ann = method.getAnnotation(Command.class);

      List<Predicate<UIContext>> enabledPredicates = new ArrayList<>();
      for (Class<? extends Predicate<UIContext>> type : ann.enabled())
      {
         enabledPredicates.add(registry.getServices(type).get());
      }
      return new AnnotationCommandAdapter(method, instance, factory, enabledPredicates);
   }
View Full Code Here

Examples of org.jboss.forge.shell.plugins.Command

      for (Method method : plugin.getMethods())
      {
         if (Annotations.isAnnotationPresent(method, Command.class))
         {
            Command command = Annotations.getAnnotation(method, Command.class);
            CommandMetadata commandMeta = new CommandMetadata();
            commandMeta.setMethod(method);
            commandMeta.setHelp(command.help());
            commandMeta.setParent(pluginMeta);

            // Default commands are invoked via the name of the plug-in, not by
            // plug-in + command
            if ("".equals(command.value()))
            {
               commandMeta.setName(method.getName().trim().toLowerCase());
            }
            else
            {
               commandMeta.setName(command.value());
            }

            // This works because @DefaultCommand is annotated by @Command
            if (Annotations.isAnnotationPresent(method, DefaultCommand.class))
            {
View Full Code Here

Examples of org.jboss.narayana.blacktie.btadmin.Command

    for (int i = 0; i < commands.size(); i++) {
      if (command != null && !command.equals(commands.get(i))) {
        continue;
      }
      try {
        Command command = CommandHandler.loadCommand(commands.get(i));
        log.info("Example usage: " + commands.get(i) + " "
            + command.getExampleUsage());
      } catch (Exception e) {
        log.error("Could not get help for command: " + commands.get(i),
            e);
        throw new CommandFailedException(-1);
      }
View Full Code Here

Examples of org.jboss.soa.esb.services.jbpm.cmd.Command

    message.getBody().add(Constants.COMMAND_CODE, messageFacade.getOpCode().toString());
    messageFacade.setJBPMContextParameters(message);

        CommandExecutor commandExecutor = CommandExecutor.getInstance();
        String commandString  = (String)message.getBody().get(Constants.COMMAND_CODE);
        Command command = commandExecutor.getCommand(commandString);
        command.execute(message);
        return message;
  }
View Full Code Here

Examples of org.jbpm.api.cmd.Command

      long start = System.currentTimeMillis();
        ProcessEngine engine = getProcessEngine(ctx);
        org.jbpm.api.ProcessInstance pi = engine.getExecutionService().findProcessInstanceById(internalId);
        final ExecutionImpl execution = (ExecutionImpl) pi.getProcessInstance();
        final List<String> transitionNames = new ArrayList<String>();
        engine.execute(new Command() {
            public Object execute(Environment env) {
                for (Transition transition : execution.getActivity().getOutgoingTransitions()) {
                    transitionNames.add(transition.getDestination().getName());
                }
                return null;
View Full Code Here

Examples of org.jbpm.client.Command

    }
  }

  protected Collection<Long> acquireJobs() {
    CommandService commandService = jobExecutor.getCommandExecutor();
    Command acquireJobsCommand = jobExecutor.getAcquireJobsCommand();
    return (Collection<Long>) commandService.execute(acquireJobsCommand);
  }
View Full Code Here

Examples of org.jbpm.command.Command

public class JobListenerBean extends CommandListenerBean {

  private static final long serialVersionUID = 1L;

  protected Command extractCommand(Message message) {
    Command command = null;
    try {
      // checking for availability of the jobId property
      boolean isJobIdAvailable = false;
      Enumeration enumeration = message.getPropertyNames();
      while ( (!isJobIdAvailable)
View Full Code Here

Examples of org.jbpm.task.service.Command

  public void addPackage(Task task, AddTaskResponseHandler responseHandler) {
    List args = new ArrayList(2);
    args.add(task);
    args.add(null);
    Command cmd = new Command(counter.getAndIncrement(),
                CommandName.AddTaskRequest,
                args);

    handler.addResponseHandler(cmd.getId(), responseHandler);

    session.write(cmd);
  }
View Full Code Here

Examples of org.jcommando.Command

      classpath.setLongMnemonic("classpath");
      classpath.setDescription("Specify the class path of the algorithm.");
      classpath.setOptionType("String");
      addOption(classpath);

      Command create = new Command();
      create.setName("create");
      create.setId("create");
      create.addOption(alg);
      create.addOption(classpath);
      create.addOption(graph);
      create.addOption(inputfile);
      create.addOption(graphtype);
      create.setGrouping( createCreateGrouping() );
      addCommand(create);

      Command execute = new Command();
      execute.setName("commandless");
      execute.setId("execute");
      execute.setGrouping( createExecuteGrouping() );
      addCommand(execute);

   }
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.