conf.setProperty(PROP_DELICIOUS_LASTSYNC, System.currentTimeMillis() +""); conf.persist(new String[] {PROP_DELICIOUS_LASTSYNC});
    public void execute(Map arguments, Registry registry, Output output)                 throws Exception    {        Configuration conf = registry.getConfiguration();              String timeMillisString = conf.getProperty(PROP_DELICIOUS_LASTSYNC);                LOG.info("Using del.icio.us username: "+conf.getProperty(PROP_DELICIOUS_USER));        String apiEndPoint = conf.getProperty(PROP_DELICIOUS_APIENDPOINT, DEF_DELICIOUS_APIENDPOINT);                Delicious delicious = new Delicious(conf.getProperty(PROP_DELICIOUS_USER),                                             conf.getProperty(PROP_DELICIOUS_PASS),                                            apiEndPoint);        if ( timeMillisString == null ) {            // if last update time of roosster is null, then roosster was never synced             // with del.icio.us so we get all posts and say a big "Sorry Joshua"            LOG.info("Never synced before with del.icio.us, so this may take some time! Go, get yourself a coffee!");            syncDelicious(delicious, registry, new Date(0));        } else {            String dateStr = conf.getProperty(LAST_UPDATE);                        // time of last update in roosster            Date lastRsstUpdate = dateStr != null ? new Date(Long.parseLong(dateStr)) : new Date();                        // time of last sync between roosster and del.icio.us            Date lastSync       = new Date(Long.parseLong(timeMillisString));                        // time of last update of del.icio.us             Date lastDelUpdate  = delicious.getLastUpdate(); // remote call                        LOG.info("Last sync was "+lastSync+", del.icio.us' last update was "+lastDelUpdate);                        if ( lastSync.after(lastDelUpdate) && lastSync.after(lastRsstUpdate) )                 LOG.info("No entries changed on del.icio.us and in roosster. No action needed!");            else                 syncDelicious(delicious, registry, lastSync);                    }        // store current time in properties        conf.setProperty(PROP_DELICIOUS_LASTSYNC, System.currentTimeMillis() +"");        conf.persist(new String[] {PROP_DELICIOUS_LASTSYNC});    }