use of org.onebusaway.phone.impl.PhoneArrivalsAndDeparturesModel in project onebusaway-application-modules by camsys.
the class ArrivalsAndDeparturesTemplate method buildTemplate.
@Override
public void buildTemplate(ActionContext context) {
ValueStack valueStack = context.getValueStack();
PhoneArrivalsAndDeparturesModel model = (PhoneArrivalsAndDeparturesModel) valueStack.findValue("model");
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");
addMessage(Messages.HOW_TO_GO_BACK);
addAction("\\*", "/back");
addMessage(Messages.TO_REPEAT);
}
Aggregations