Examples of Command


Examples of org.eclipse.gef.commands.Command

  /**
   * @generated
   */
  protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
    Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
        : getCompleteCreateRelationshipCommand(req);
    return command != null ? command : super
        .getCreateRelationshipCommand(req);
  }
View Full Code Here

Examples of org.eclipse.persistence.sessions.coordination.Command

    public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream)_in;
            if (method.equals("executeCommand")) {
                Command arg0 = (Command)in.read_value(Command.class);
                Object result = target.executeCommand(arg0);
                OutputStream out = reply.createReply();
                Util.writeAny(out, result);
                return out;
            }
View Full Code Here

Examples of org.eclipse.wb.gef.core.Command

  @Override
  public Command getCommand(Request request) {
    // use such "indirect" command because when we press Ctrl and _don't_ move mouse after
    // this, we will show correct feedback text (without hint), and set correct m_command,
    // but GEF already asked command and will not ask it again
    return new Command() {
      @Override
      public void execute() throws Exception {
        getHost().getViewer().getEditDomain().executeCommand(m_command);
      }
    };
View Full Code Here

Examples of org.exist.debuggee.dbgp.packets.Command

      Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
     
      IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
      if (session == null) return Sequence.EMPTY_SEQUENCE;
     
      Command command = new org.exist.debuggee.dbgp.packets.StackGet(session, "");
      command.exec();
     
      return Utils.nodeFromString( getContext(), new String( command.responseBytes() ) );
     
    } catch (Throwable e) {
      throw new XPathException(this, Module.DEBUG001, e);
    }
  }
View Full Code Here

Examples of org.foo.shell.Command

  public void start(final BundleContext context) throws Exception {
    tracker = new ServiceTracker(context, Command.class.getName(), new ServiceTrackerCustomizer() {
     
      public Object addingService(ServiceReference ref) {
        Command command = (Command) context.getService(ref);
        startTty(context, command);
        return command;
      }
     
      public void modifiedService(ServiceReference ref, Object service) {
View Full Code Here

Examples of org.geomajas.command.Command

      }

      // check access rights for the command
      if (securityContext.isCommandAuthorized(commandName)) {

        Command command = null;
        try {
          command = applicationContext.getBean(commandName, Command.class);
        } catch (BeansException be) {
          log.error("could not create command bean for {}", new Object[] { commandName }, be);
        }
        if (null != command) {
          response = command.getEmptyCommandResponse();
          response.setId(id);
          try {
            command.execute(request, response);
          } catch (Throwable throwable) { //NOPMD
            log.error("Error executing command", throwable);
            response.getErrors().add(throwable);
          }
        } else {
View Full Code Here

Examples of org.geomajas.puregwt.client.command.Command

    eventBus.addHandler(ViewPortChangedHandler.TYPE, mapGadgetRenderer);
    eventBus.addHandler(MapResizedEvent.TYPE, mapGadgetRenderer);

    setFallbackController(new NavigationController());

    Command commandRequest = new Command(GetMapConfigurationRequest.COMMAND);
    commandRequest.setCommandRequest(new GetMapConfigurationRequest(id, applicationId));
    CommandService cmdService = new CommandService();
    cmdService.execute(commandRequest, new CommandCallback() {

      public void onSuccess(CommandResponse response) {
        if (response instanceof GetMapConfigurationResponse) {
View Full Code Here

Examples of org.glite.ce.creamapi.cmdmanagement.Command

                pstmt.setInt(index, limit);
            }

            rset = pstmt.executeQuery();

            Command command = null;
            Calendar calendar = null;
            Timestamp timestamp = null;

            if (rset != null) {               
                query = new StringBuffer(" IN (");

                while (rset.next()) {
                    command = new Command(rset.getString(NAME_FIELD), rset.getString(CATEGORY_FIELD));
                    command.setId(rset.getLong(ID_FIELD));
                    command.setUserId(rset.getString(USER_ID_FIELD));
                    command.setDescription(rset.getString(DESCRIPTION_FIELD));
                    command.setFailureReason(rset.getString(FAILURE_REASON_FIELD));
                    command.setCommandGroupId(rset.getString(COMMAND_GROUP_ID_FIELD));
                    command.setAsynchronous(true);
                    command.setPriorityLevel(rset.getInt(PRIORITY_LEVEL_FIELD));
                    command.setExecutionMode(ExecutionModeValues.PARALLEL.equals(rset.getString(EXECUTION_MODE_FIELD)) ? ExecutionModeValues.PARALLEL: ExecutionModeValues.SERIAL);

                    calendar = null;
                    timestamp = rset.getTimestamp(CREATION_TIME_FIELD);
                    if (timestamp != null) {
                        calendar = Calendar.getInstance();
                        calendar.setTimeInMillis(timestamp.getTime());
                        command.setCreationTime(calendar);
                    }

                    commandList.put(""+command.getId(), command);

                    query.append("'").append(command.getId()).append("',");
                }

                query.replace(query.length() - 1, query.length(), ")");

                if (commandList.size() > 0) {
                    StringBuffer setScheduledQuery = new StringBuffer("update ");
                    setScheduledQuery.append(QUEUE_TABLE).append(" set ").append(IS_SCHEDULED_FIELD);
                    setScheduledQuery.append(" = true where ").append(ID_FIELD).append(query);

                    pstmt = connection.prepareStatement(setScheduledQuery.toString());
                    pstmt.executeUpdate();

                    StringBuffer selectParameterQuery = new StringBuffer("select ");
                    selectParameterQuery.append(PARAMETER_TABLE).append(".").append(ID_FIELD).append(" as PARAMETER_ID, ");
                    selectParameterQuery.append(PARAMETER_TABLE).append(".").append(COMMAND_ID_FIELD).append(" as ").append(COMMAND_ID_FIELD).append(", ");
                    selectParameterQuery.append(PARAMETER_TABLE).append(".").append(NAME_FIELD).append(" as PARAMETER_NAME, ");
                    selectParameterQuery.append(PARAMETER_TABLE).append(".").append(VALUE_FIELD).append(" as PARAMETER_VALUE from ");
                    selectParameterQuery.append(PARAMETER_TABLE).append(" where ").append(COMMAND_ID_FIELD).append(query);

                    pstmt = connection.prepareStatement(selectParameterQuery.toString());
                    rset = pstmt.executeQuery();

                    if (rset != null) {
                        long commandId = -1;

                        while (rset.next()) {
                            commandId = rset.getLong(COMMAND_ID_FIELD);

                            command = commandList.get(""+commandId);

                            if (commandId > 0) {
                                parameterName = rset.getString("PARAMETER_NAME");
                                parameterValue = rset.getString("PARAMETER_VALUE");

                                if (command.containsParameterKey(parameterName)) {
                                    List<String> valueList = command.getParameterMultivalue(parameterName);
                                    valueList.add(parameterValue);

                                    command.addParameter(parameterName, valueList);
                                } else {
                                    command.addParameter(parameterName, parameterValue);
                                }
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.globus.ftp.vanilla.Command

     * @throws java.io.IOException
     * @throws org.globus.ftp.exception.ServerException
     */
    public void chmod(String path, String mode) throws IOException, ServerException {
        try {
            Command cmd = new Command("SITE CHMOD", mode + " " + path);
            this.controlChannel.execute(cmd);
        } catch (FTPReplyParseException ex) {
            throw new IOException("Parse Error: " + ex.getMessage());
        } catch (UnexpectedReplyCodeException ex) {
            throw new IOException("Unexpected Reply: " + ex.getMessage());
View Full Code Here

Examples of org.gradle.launcher.daemon.protocol.Command

* If an action of this type receives a command that is not Build it will throw an exception.
*/
abstract public class BuildCommandOnly implements DaemonCommandAction {

    public void execute(DaemonCommandExecution execution) {
        Command command = execution.getCommand();
        if (!(command instanceof Build)) {
            throw new IllegalStateException(String.format("{} command action received a command that isn't Build (command is {}), this shouldn't happen", this.getClass(), command.getClass()));
        }

        doBuild(execution, (Build)command);
    }
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.