Package WAManager

Examples of WAManager.ExecuteWA


                break;
            }
            case 3: {
                // Eseguo script python
                // python script.py ../HTMLs/33.html
                ExecuteWA wa = new ExecuteWA();
                wa.setLayout(layoutWA);
                if (LayoutWA.listaHtml.getSelectedValue() == null) {
                    LayoutWA.log("Selezionare un html");
                    LayoutWA.setErrorModality(true);
                } else {
                    // Eseguo i wa
                    wa.executePythonScript(LayoutWA.listaHtml.getSelectedValue().toString());
                }
                break;
            }
            case 4: {
                // Setto la modalità errore del layout
View Full Code Here


            scriptOk = LayoutWA.listaWAHtml.getSelectedValue().toString();
            scriptOk = scriptOk.substring(scriptOk.indexOf("-id") + 3, scriptOk.length());
        }

        ArrayList<String> listaScriptFormatted = formatListWaHtml(LayoutWA.getListWAToUpdate());
        ExecuteWA db = new ExecuteWA();
        db.upDateDb(scriptOk, listaScriptFormatted);
    }
View Full Code Here

                break;
            }
            case 3: {
                // Eseguo script python
                // python script.py ../HTMLs/33.html
                ExecuteWA wa = new ExecuteWA();
                // Eseguo i wa
                String file = (String) params;
                wa.executePythonScriptTest(file);
                // Recupero la sequenza dei file wa HTML
                ArrayList<String> listWaHtml = getListWAHtml(file);

                ArrayList<String> temp = new ArrayList<String>();
                // Formatto la lista, torno solo gli id
                for (int l = 0; l < listWaHtml.size(); l++) {
                    String fileName = listWaHtml.get(l);
                    if (!fileName.equals("Nessuno")) {
                        temp.add(fileName.substring(fileName.indexOf("-id") + 3, fileName.length()));
                    }
                }
                return temp;
                //break;
            }
            case 7: {
                // Cancello i file wa hmtml

                File htmlDir = new File(ExecuteWA.path_html);
                File[] files = htmlDir.listFiles();
                File tmp_f = null;
                for (int i = 0; i < files.length; i++) {
                    tmp_f = files[i];
                    if (!tmp_f.isDirectory()) {
                        String temp = tmp_f.getName();
                        // Cancello i file creati dallo script python
                        if ((temp.contains("_")) && (temp.contains("-id"))) {
                            if (tmp_f.canWrite()) {
                                tmp_f.delete();
                            }
                        }
                    }
                }
                break;
            }
            case 8: {
                // Aggiorno il database
                Object[] temp = (Object[]) params;
                String idScript = (String) temp[0];
                ArrayList<String> listWaHtml = (ArrayList<String>) temp[1];

                ExecuteWA db = new ExecuteWA();
                db.upDateDbTest(idScript, listWaHtml);
                break;
            }
            case 10: {
                // Torno una lista random dei file html
                File htmlDir = new File(ExecuteWA.path_html);
View Full Code Here

TOP

Related Classes of WAManager.ExecuteWA

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.