Examples of AgiActionName


Examples of org.onebusaway.probablecalls.AgiActionName

    StopsWithArrivalsAndDeparturesBean result = model.getResult();

    buildPredictedArrivalsTemplate(result.getArrivalsAndDepartures());

    addMessage(Messages.ARRIVAL_INFO_ON_SPECIFIC_ROUTE);
    AgiActionName byRouteAction = addActionWithParameterFromMatch("1(\\d+)#",
        "/stop/arrivalsAndDeparturesForRoute", "route", 1);
    byRouteAction.putParam("model", model);

    addMessage(Messages.ARRIVAL_INFO_BOOKMARK_THIS_LOCATION);
    AgiActionName bookmarkAction = addAction("2", "/stop/bookmark");
    bookmarkAction.putParam("stops", result.getStops());

    addMessage(Messages.ARRIVAL_INFO_RETURN_TO_MAIN_MENU);
    addAction("3", "/index");

    addAction("(#|[04-9]|1.*\\*)", "/repeat");
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

        String toPress = Integer.toString(index);

        addMessage(Messages.FOR);

        AgiActionName stopAction = addAction(toPress,
            "/stop/arrivalsAndDeparturesForStopId");

        List<String> stopIds = MappingLibrary.map(bookmark.getStops(), "id");
        Set<String> routeIds = new HashSet<String>(MappingLibrary.map(
            bookmark.getRoutes(), "id", String.class));

        stopAction.putParam("stopIds", stopIds);
        stopAction.putParam("routeIds", routeIds);

        addBookmarkDescription(bookmark);

        addMessage(Messages.PLEASE_PRESS);
        addText(toPress);
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

     
      addMessage(Messages.PLEASE_PRESS);
     
      String key = Integer.toString(index++);
      addText(key);
      AgiActionName action = addAction(key,"/stop/arrivalsAndDeparturesForStopId");
      action.putParam("stopIds",Arrays.asList(stop.getId()));
    }

    addMessage(Messages.HOW_TO_GO_BACK);
    addAction("\\*", "/back");

View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

        addMessage(Messages.PLEASE_PRESS);
        String toPress = Integer.toString(index);
        addText(toPress);

        AgiActionName deleteAction = addAction(toPress,
            "/bookmarks/deleteByIndex");
        deleteAction.putParam("index", index - 1);

        index++;
      }
    }
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

public class SetDefaultSearchLocationTemplate extends AbstractAgiTemplate {

  @Override
  public void buildTemplate(ActionContext context) {
    addMessage(Messages.SET_DEFAULT_LOCATION);
    AgiActionName action = setNextAction("/back");
    action.putParam("count", 2);
  }
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

    addText(Messages.IS);
    addText(stop.getCode());

    addMessage(Messages.STOP_FOUND_ARRIVAL_INFO);
    AgiActionName arrivalInfoAction = addAction("1", "/stop/arrivalsAndDeparturesForStopId");
    arrivalInfoAction.putParam("stopIds", Arrays.asList(stop.getId()));

    addMessage(Messages.STOP_FOUND_BOOKMARK_THIS_LOCATION);
    AgiActionName bookmarkAction = addAction("2", "/stop/bookmark");
    bookmarkAction.putParam("stop", stop);

    addMessage(Messages.STOP_FOUND_RETURN_TO_MAIN_MENU);
    addAction("3", "/index");

    addAction("[04-9]", "/repeat");
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

      addNavigationSelectionActionForIndex(navigation, index + 1);
    }

    if (index >= names.size()) {

      AgiActionName action = setNextAction("/search/navigate-to");
      action.putParam("navigation", navigation);
      action.putParam("index", 0);
      action.setExcludeFromHistory(true);

      // Add an extra pause so the user has a chance to make a selection from
      // the previous entry
      addPause(1000);

      addMessage(Messages.TO_REPEAT);

    } else {

      String key = addNavigationSelectionActionForIndex(navigation, index);

      NameBean name = names.get(index);
      handleName(name, key);

      addNavigateToAction(navigation, "4", first(index - 1));
      addNavigateToAction(navigation, "6", index + 1);
      addNavigateToAction(navigation, "7", first(index - 10));
      addNavigateToAction(navigation, "9", index + 10);

      AgiActionName action = setNextAction("/search/navigate-to");
      action.putParam("navigation", navigation);
      action.putParam("index", index + 1);
      action.setExcludeFromHistory(true);
    }

    addAction("\\*", "/back");
  }
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

    return i;
  }

  private void addNavigateToAction(NavigationBean navigation, String key,
      int index) {
    AgiActionName action = addAction(key, "/search/navigate-to");
    action.putParam("navigation", navigation);
    action.putParam("index", index);
    action.setExcludeFromHistory(true);
  }
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

  private String addNavigationSelectionActionForIndex(
      NavigationBean navigation, int index) {
    int keyIndex = (index % 2) + 1;

    String key = Integer.toString(keyIndex);
    AgiActionName action = addAction(key, "/search/navigate-down");
    action.putParam("navigation", navigation);
    action.putParam("index", index);
    return key;
  }
View Full Code Here

Examples of org.onebusaway.probablecalls.AgiActionName

     
      addMessage(Messages.PLEASE_PRESS);
     
      String key = Integer.toString(index++);
      addText(key);
      AgiActionName action = addAction(key,"/search/tree");
      action.putParam("route", route);
    }

    addMessage(Messages.HOW_TO_GO_BACK);
    addAction("\\*", "/back");

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.