Package com.flaptor.wizard

Examples of com.flaptor.wizard.ProgressPageElement


    public void start() {
        wizard.startWizard();
    }

    private void install(UI ui) {
        ProgressPageElement installprogress = new ProgressPageElement("progress", null);
        PageElement errorReport = new PageElement("");
        PageElement finishReport = new PageElement("");
        installing.add(installprogress);
        installing.add(errorReport);
        installing.add(finishReport);
       
        commonConfig.localhostName = "localhost";
        if (multiMachine && oneLocal) commonConfig.localhostName = thisMachinesName.getProperty("localhostName").trim();
        if (!multiMachine || oneLocal) {
          commonConfig.installOnBaseDir = new File(dirPortOptions.getProperty("path").trim());
          commonConfig.installOnBasePort = Integer.parseInt(dirPortOptions.getProperty("basePort"));
        }
        commonConfig.copyViaSSH = copySSH.getProperty("method").equals("0");
        commonConfig.outputDir = new File("output").getAbsolutePath();
   
      //init to localhost:baseport
      crawlerConfig.installOnBasePort     = commonConfig.installOnBasePort; crawlerConfig.installOnHost     = commonConfig.localhostName; crawlerConfig.installOnBaseDir     = commonConfig.installOnBaseDir;
      indexerConfig.installOnBasePort     = commonConfig.installOnBasePort; indexerConfig.installOnHost     = commonConfig.localhostName; indexerConfig.installOnBaseDir     = commonConfig.installOnBaseDir;
      searcherConfig.installOnBasePort     = commonConfig.installOnBasePort; searcherConfig.installOnHost     = commonConfig.localhostName; searcherConfig.installOnBaseDir     = commonConfig.installOnBaseDir;
      cacheServerConfig.installOnBasePort   = commonConfig.installOnBasePort; cacheServerConfig.installOnHost   = commonConfig.localhostName; cacheServerConfig.installOnBaseDir   = commonConfig.installOnBaseDir;
      clusteringWebConfig.installOnBasePort   = commonConfig.installOnBasePort; clusteringWebConfig.installOnHost = commonConfig.localhostName; clusteringWebConfig.installOnBaseDir = commonConfig.installOnBaseDir;

    //change for remote components
    if (!crawlerConfig.installOnThisMachine) {
      crawlerConfig.installOnBasePort     = Integer.parseInt(crawlerInstallRemote.getProperty("basePort"))
      crawlerConfig.installOnHost       = crawlerInstallRemote.getProperty("host");
      crawlerConfig.installOnBaseDir      = new File(crawlerInstallRemote.getProperty("baseDir"));
    }
    if (!searcherConfig.installOnThisMachine) {
      searcherConfig.installOnBasePort     = Integer.parseInt(searcherInstallRemote.getProperty("basePort"))
      searcherConfig.installOnHost       = searcherInstallRemote.getProperty("host");   
      searcherConfig.installOnBaseDir      = new File(searcherInstallRemote.getProperty("baseDir"));
    }
    if (!indexerConfig.installOnThisMachine) {
      indexerConfig.installOnBasePort     = Integer.parseInt(indexerInstallRemote.getProperty("basePort"))
      indexerConfig.installOnHost       = indexerInstallRemote.getProperty("host");   
      indexerConfig.installOnBaseDir      = new File(indexerInstallRemote.getProperty("baseDir"));
    }
    if (!cacheServerConfig.installOnThisMachine) {
      cacheServerConfig.installOnBasePort   = Integer.parseInt(cacheServerInstallRemote.getProperty("basePort"))
      cacheServerConfig.installOnHost     = cacheServerInstallRemote.getProperty("host");   
      cacheServerConfig.installOnBaseDir    = new File(cacheServerInstallRemote.getProperty("baseDir"));
    else {
      cacheServerConfig.externalHostName  = cacheServerInstall.getProperty("host");     
    }
    if (!clusteringWebConfig.installOnThisMachine) {
      clusteringWebConfig.installOnBasePort   = Integer.parseInt(clusteringWebInstallRemote.getProperty("basePort"))
      clusteringWebConfig.installOnHost     = clusteringWebInstallRemote.getProperty("host");   
      clusteringWebConfig.installOnBaseDir  = new File(clusteringWebInstallRemote.getProperty("baseDir"));
    }

        try {
            crawlerConfig.pagedbSeeds = IOUtil.readAll(ClassLoader.getSystemClassLoader().getResourceAsStream("pagedb.seeds"));
            crawlerConfig.hotspots = IOUtil.readAll(ClassLoader.getSystemClassLoader().getResourceAsStream("hotspots.regex"));
          Installer installer = new Installer(distDir, commonConfig, indexerConfig, searcherConfig, crawlerConfig, cacheServerConfig, clusteringWebConfig, installprogress, ui);
          installer.install();
          File crawlerDir = new File(installer.getCrawlerBaseDir(), "crawler");
          if (crawlerConfig.install) new CrawlerConfigurationWizard(graphicMode, crawlerDir).start();
          if (multiMachine) installer.makeDist();
         
          finishReport.setText("Hounder installed correctly!");
          installprogress.setExplanation("");
          installprogress.setProgress(100);
          ui.elementUpdated(installprogress);
            if (searcherConfig.install)     addComponentSummary("Searcher", searcherConfig);
            if (indexerConfig.install)      addComponentSummary("Indexer", indexerConfig);
            if (crawlerConfig.install)      addComponentSummary("Crawler", indexerConfig);
            if (cacheServerConfig.installaddComponentSummary("Cache Server", cacheServerConfig);
View Full Code Here

TOP

Related Classes of com.flaptor.wizard.ProgressPageElement

Copyright © 2018 www.massapicom. 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.