franta-hg@2: package cz.frantovo.abcDrupal; franta-hg@2: franta-hg@2: import java.util.Date; franta-hg@2: franta-hg@2: /** franta-hg@2: * Řídící třída, stará se o konverzi z databáze Drupalu do databáze ABC. franta-hg@2: * @author fiki franta-hg@2: */ franta-hg@2: public class Konvertor { franta-hg@2: franta-hg@2: private String jdbcZdroj; franta-hg@2: private String jdbcCil; franta-hg@2: private PosluchacLogu posluchacLogu; franta-hg@2: franta-hg@2: public Konvertor(String jdbcZdroj, String jdbcCil, PosluchacLogu posluchacLogu) { franta-hg@2: this.jdbcZdroj = jdbcZdroj; franta-hg@2: this.jdbcCil = jdbcCil; franta-hg@2: this.posluchacLogu = posluchacLogu; franta-hg@2: } franta-hg@2: franta-hg@2: public void konvertuj() { franta-hg@2: vypis("Začíná migrace"); franta-hg@2: vypis("Migrace dokončena"); franta-hg@2: } franta-hg@2: franta-hg@2: private void vypis(String zprava) { franta-hg@2: if (posluchacLogu != null) { franta-hg@2: posluchacLogu.vypis(new Date() + " " + zprava); franta-hg@2: } franta-hg@2: } franta-hg@2: }