Examples of GuiQuickstartDataModel


Examples of org.onebusaway.quickstart.GuiQuickstartDataModel

     * WAR.
     */
    File tmpDir = getTempDirectory();

    if (args.length == 0) {
      GuiQuickstartDataModel model = performGuiConfiguration(warUrl, tmpDir);

      if (model.isBuildOnly()) {

        String gtfsPath = model.getGtfsPath();
        String bundlePath = model.getTransitDataBundlePath();
        String[] subArgs = {gtfsPath, bundlePath};
        performBuild(warUrl, tmpDir, subArgs);

      } else {

        List<String> runArgs = new ArrayList<String>();
        if (model.isBuildEnabled()) {
          runArgs.add("-" + WebappCommon.ARG_BUILD);
          runArgs.add("-" + WebappCommon.ARG_GTFS_PATH + "="
              + model.getGtfsPath());
        }

        if (model.getTripUpdatesUrl() != null) {
          runArgs.add("-gtfsRealtimeTripUpdatesUrl="
              + model.getTripUpdatesUrl());
        }
        if (model.getVehiclePositionsUrl() != null) {
          runArgs.add("-gtfsRealtimeVehiclePositionsUrl="
              + model.getVehiclePositionsUrl());
        }
        if (model.getAlertsUrl() != null) {
          runArgs.add("-gtfsRealtimeAlertsUrl=" + model.getAlertsUrl());
        }
        runArgs.add(model.getTransitDataBundlePath());
        performRun(warUrl, tmpDir, false, runArgs.toArray(new String[runArgs.size()]));
      }
    } else {
      String firstArg = args[0];
      String[] subArgs = new String[args.length - 1];
View Full Code Here

Examples of org.onebusaway.quickstart.GuiQuickstartDataModel

     * those JARs.
     */
    URLClassLoader classloader = bootstrapClasspath(warUrl, tmpDir, false);
    Class<?> c = classloader.loadClass("org.onebusaway.quickstart.bootstrap.GuiBootstrapMain");
    Method method = c.getMethod("configureBootstrapArgs");
    GuiQuickstartDataModel bootstrapArgs = (GuiQuickstartDataModel) invokeWithProperClassloader(
        classloader, method);
    return bootstrapArgs;
  }
View Full Code Here

Examples of org.onebusaway.quickstart.GuiQuickstartDataModel

public class GuiBootstrapMain {

  public static GuiQuickstartDataModel configureBootstrapArgs()
      throws IOException, Exception {

    final GuiQuickstartDataModel model = new GuiQuickstartDataModel();
    loadModel(model);

    WizardController controller = new WizardController();
    controller.addPanel(WelcomeWizardPanelController.class,
        new WelcomeWizardPanelController());
    controller.addPanel(TransitDataBundlePathWizardPanelController.class,
        new TransitDataBundlePathWizardPanelController(model, controller));
    controller.addPanel(QuickStartTypeWizardPanelController.class,
        new QuickStartTypeWizardPanelController(model));
    controller.addPanel(GtfsPathWizardPanelController.class,
        new GtfsPathWizardPanelController(model, controller));
    controller.addPanel(GtfsRealtimePathsWizardPanelController.class,
        new GtfsRealtimePathsWizardPanelController(model));
    controller.addPanel(RunWizardPanelController.class,
        new RunWizardPanelController(model));
    controller.setCurrentPanel(WelcomeWizardPanelController.class);

    WizardDialog dialog = new WizardDialog(controller);
    dialog.setModal(true);
    dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    dialog.setVisible(true);

    saveModel(model);

    if (controller.getCompletionState() == ECompletionState.CANCELLED)
      System.exit(0);

    String path = model.getTransitDataBundlePath();
    new File(path).mkdirs();

    JConsoleDialog console = new JConsoleDialog(
        new File(path, "console.log").getAbsolutePath());
    console.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
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.