Beispiel #1
0
 @Override
 public void actionPerformed(ActionEvent udalost) {
   try {
     Evidence evidence = new Evidence(localPath);
     TableModel modelVipFirmy = new ModelStudenti(evidence);
     TableModel modelNeplaticiFirmy = new ModelStatickeStranky(evidence);
     TableModel modelVsechnyFirmy = new ModelOdevzdaneUkoly(evidence);
     TableModel modelPlaticiFirmy = new ModelPublikace(evidence);
     TableModel modelVipPlatFirmy = new ModelUkoly(evidence);
     PraceSDaty archiv = evidence.getArchiv();
     Gui gui =
         new Gui(
             modelVipFirmy,
             modelNeplaticiFirmy,
             modelVsechnyFirmy,
             modelPlaticiFirmy,
             modelVipPlatFirmy,
             archiv,
             evidence,
             ftpClient,
             nacitani);
   } catch (Exception ex) {
     Logger.getLogger(Nacitani.class.getName()).log(Level.SEVERE, null, ex);
   }
 }
Beispiel #2
0
    @Override
    public Void doInBackground() throws Exception {

      setProgress(0);

      try {
        Thread.sleep(1000);
      } catch (InterruptedException ignore) {
      }
      setProgress(10);

      ftpClient.download();

      setProgress(30);

      apiClient.downloadFile("admin/api/students", "studenti.csv");

      setProgress(40);

      apiClient.downloadFile("admin/api/static/1", "menu.csv");
      setProgress(48);

      apiClient.downloadFile("admin/api/statickat", "kategoriemenu.csv");
      setProgress(54);

      apiClient.downloadFile("admin/api/publikace/1", "publikace.csv");
      setProgress(61);

      apiClient.downloadFile("admin/api/publikacekat", "publikacekategorie.csv");
      setProgress(70);

      apiClient.downloadFile("admin/api/skoly", "skoly.csv");
      setProgress(75);

      apiClient.downloadFile("admin/api/fakulty", "fakulty.csv");
      setProgress(79);

      apiClient.downloadFile("admin/api/skupiny", "skupinysemestrpredmet.csv");
      setProgress(85);

      apiClient.downloadFile("admin/api/predmety", "predmet.csv");
      setProgress(90);

      apiClient.downloadFile("admin/api/ukoly/1", "ukoly.csv");

      setProgress(95);
      apiClient.downloadFile("admin/api/userukoly/1", "userukoly.csv");

      setProgress(100);

      Evidence evidence = new Evidence(localPath);
      TableModel modelStudenti = new ModelStudenti(evidence);
      TableModel modelStatickeStranky = new ModelStatickeStranky(evidence);
      TableModel modelOdevzdaneUkoly = new ModelOdevzdaneUkoly(evidence);
      TableModel modelPublikace = new ModelPublikace(evidence);
      TableModel modelUkoly = new ModelUkoly(evidence);
      PraceSDaty archiv = evidence.getArchiv();
      Gui gui =
          new Gui(
              modelStudenti,
              modelStatickeStranky,
              modelOdevzdaneUkoly,
              modelPublikace,
              modelUkoly,
              archiv,
              evidence,
              ftpClient,
              nacitani);

      return null;
    }