Examples of Action


Examples of com.badlogic.gdx.scenes.scene2d.Action

  @Override
  public void act (float delta) {
    int len = actions.size();
    boolean allDone = true;
    Action action;
    for (int i = 0; i < len; i++) {
      action = actions.get(i);
      if (!action.isDone()) {
        action.act(delta);
        allDone = false;
      } else {
        if (!finished[i]) {
          action.finish();
          finished[i] = true;
          allDone &= finished[i];
        }
      }
    }
View Full Code Here

Examples of com.bergerkiller.bukkit.tc.actions.Action

   * @param forMember to remove the actions for
   */
  public void removeActions(MinecartMember<?> forMember) {
    Iterator<Action> iter = this.actions.iterator();
    while (iter.hasNext()) {
      Action action = iter.next();
      if (action instanceof MemberAction && ((MemberAction) action).getMember() == forMember) {
        iter.remove();
      }
    }
  }
View Full Code Here

Examples of com.bj58.spat.gaea.server.core.communication.http.Action

    HttpContext hc = new HttpContext();
    hc.setUri("/news/101001");
    hc.setMethod(HttpRequestMethod.GET);

    Action action = RequestMapping.getAction(hc);
    List<Parameter> paraList = action.getParamList();

    Assert.assertEquals("RestService", action.getLookup());
    Assert.assertEquals("getNews", action.getMethodName());
    Assert.assertEquals(1, paraList.size());
    Assert.assertEquals("newsID", paraList.get(0).getMapping());
    Assert.assertEquals(0, paraList.get(0).getMethodParaIndex());
    Assert.assertEquals(0, paraList.get(0).getUrlParaIndex());
    Assert.assertEquals(101001, paraList.get(0).getValue());
    Assert.assertEquals(HttpParameterType.PathParameter, paraList.get(0)
        .getParaType());

    hc.setUri("/newslist/101002/123");
    action = RequestMapping.getAction(hc);

    Assert.assertEquals("RestService", action.getLookup());
    Assert.assertEquals("getNews", action.getMethodName());
    Assert.assertEquals(2, action.getParamList().size());

    Assert.assertEquals("cateID", action.getParamList().get(0).getMapping());
    Assert.assertEquals(0, action.getParamList().get(0)
        .getMethodParaIndex());
    Assert.assertEquals(0, action.getParamList().get(0).getUrlParaIndex());
    Assert.assertEquals(101002, action.getParamList().get(0).getValue());
    Assert.assertEquals(HttpParameterType.PathParameter, action
        .getParamList().get(0).getParaType());

    Assert.assertEquals("userID", action.getParamList().get(1).getMapping());
    Assert.assertEquals(1, action.getParamList().get(1)
        .getMethodParaIndex());
    Assert.assertEquals(1, action.getParamList().get(1).getUrlParaIndex());
    Assert.assertEquals(123, action.getParamList().get(1).getValue());
    Assert.assertEquals(HttpParameterType.PathParameter, action
        .getParamList().get(1).getParaType());
  }
View Full Code Here

Examples of com.blogger.tcuri.appserver.Action

     * {@inheritDoc}
     */
    @Override
    public Resolution execute(InterceptorChain chain) throws Exception {
        ActionContext context = ActionContext.get();
        Action action = chain.getAction();
        Class<? extends Action> actionClass = action.getClass();
        for (Field field : actionClass.getFields()) {
            Class<?> type = field.getType();
            if (type == String.class) {
                field.set(action, context.param(field.getName()));
            } else if (type == List.class) {
View Full Code Here

Examples of com.cburch.logisim.proj.Action

      caret.removeCaretListener(this);
      caretCircuit.removeCircuitListener(this);
     
      String val = caret.getText();
      boolean isEmpty = (val == null || val.equals(""));
      Action a;
      Project proj = caretCanvas.getProject();
      if (caretCreatingText) {
        if (!isEmpty) {
          CircuitMutation xn = new CircuitMutation(caretCircuit);
          xn.add(caretComponent);
View Full Code Here

Examples of com.chap.links.client.DataTable.Action

        for (int i = 0; i < 100; i++) {
          dataTable.setField(i, "name", "Truck " + i);
          dataTable.setField(i, "capacity", 100 * Math.round(Math.random() * 20));
          dataTable.setField(i, "store", (Math.random() > 0.1) ? "main" : "spare");

          Action action = new Action("edit");
          dataTable.addAction(i, action);
          action = new Action("delete");
          dataTable.addAction(i, action);

          DataTable childTable = new DataTable();
          for (int j = 0; j < 5; j++) {
            String priority = Math.random() > 0.2 ? "normal" : "high";
View Full Code Here

Examples of com.cloud.agent.api.routing.AggregationControlCommand.Action

        }
        return cfg;
    }

    private Answer execute(AggregationControlCommand cmd) {
        Action action = cmd.getAction();
        String routerName = cmd.getAccessDetail(NetworkElementCommand.ROUTER_NAME);
        assert routerName != null;
        assert cmd.getRouterAccessIp() != null;

        if (action == Action.Start) {
            assert (!_vrAggregateCommandsSet.containsKey(routerName));

            Queue<NetworkElementCommand> queue = new LinkedBlockingQueue<>();
            _vrAggregateCommandsSet.put(routerName, queue);
            return new Answer(cmd);
        } else if (action == Action.Finish) {
            Queue<NetworkElementCommand> queue = _vrAggregateCommandsSet.get(routerName);
            int answerCounts = 0;
            try {
                StringBuilder sb = new StringBuilder();
                sb.append("#Apache CloudStack Virtual Router Config File\n");
                sb.append("<version>\n" + _cfgVersion + "\n</version>\n");
                for (NetworkElementCommand command : queue) {
                    answerCounts += command.getAnswersCount();
                    List<ConfigItem> cfg = generateCommandCfg(command);
                    if (cfg == null) {
                        s_logger.warn("Unknown commands for VirtualRoutingResource, but continue: " + cmd.toString());
                        continue;
                    }

                    for (ConfigItem c : cfg) {
                        if (c.isFile()) {
                            sb.append("<file>\n");
                            sb.append(c.getFilePath() + c.getFileName() + "\n");
                            sb.append(c.getFileContents() + "\n");
                            sb.append("</file>\n");
                        } else {
                            sb.append("<script>\n");
                            sb.append("/opt/cloud/bin/" + c.getScript() + " " + c.getArgs() + "\n");
                            sb.append("</script>\n");
                        }
                    }
                }
                String cfgFilePath = "/var/cache/cloud/";
                String cfgFileName = "VR-"+ UUID.randomUUID().toString() + ".cfg";
                ExecutionResult result = _vrDeployer.createFileInVR(cmd.getRouterAccessIp(), cfgFilePath, cfgFileName, sb.toString());
                if (!result.isSuccess()) {
                    return new Answer(cmd, false, result.getDetails());
                }

                // 120s is the minimal timeout
                int timeout = answerCounts * _eachTimeout;
                if (timeout < 120) {
                    timeout = 120;
                }
                result = _vrDeployer.executeInVR(cmd.getRouterAccessIp(), VRScripts.VR_CFG, "-c " + cfgFilePath + cfgFileName, timeout);
                if (!result.isSuccess()) {
                    return new Answer(cmd, false, result.getDetails());
                }
                return new Answer(cmd);
            } finally {
                queue.clear();
                _vrAggregateCommandsSet.remove(routerName);
            }
        } else if (action == Action.Cleanup) {
            assert (_vrAggregateCommandsSet.containsKey(routerName));
            Queue<NetworkElementCommand> queue = _vrAggregateCommandsSet.get(routerName);
            if (queue != null) {
                queue.clear();
            }
            _vrAggregateCommandsSet.remove(routerName);

            return new Answer(cmd);
        }
        return new Answer(cmd, false, "Fail to recongize aggregation action " + action.toString());
    }
View Full Code Here

Examples of com.consol.citrus.model.testcase.core.Action

        return action;
    }

    @Override
    public Object convertModel(TestAction model) {
        Action action = new ObjectFactory().createAction();

        action.setReference(model.getName());
        action.setDescription(model.getDescription());

        return action;
    }
View Full Code Here

Examples of com.dotmarketing.portlets.workflowmessages.model.Action

   
  // public static final long ACTION_PUBLISH = 5;
 
  public static Action getActionById(long actionId) {
    HibernateUtil dh = new HibernateUtil(Action.class);
    Action myAction = null;
    try {
      dh.setQuery(
        "from action in class com.dotmarketing.portlets.workflowmessages.model.Action where id = ?");
      dh.setParam(actionId);
      myAction = (Action) dh.load();
View Full Code Here

Examples of com.dtolabs.rundeck.core.cli.Action

        final ProjectTool setup = createProjectTool();
        final String[] args = new String[]{
            "-o", "-p", PROJECT,
        };
        setup.parseArgs(args);
        Action create = setup.createAction(ProjectTool.ACTION_CREATE);
        assertTrue(create instanceof CreateAction);
        create.exec();

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