KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > presentation > BlacklistUpdateTask


1 /*
2  * Created on Mar 10, 2004
3  */

4 package org.roller.presentation;
5
6 import java.util.TimerTask JavaDoc;
7
8 import org.roller.RollerException;
9 import org.roller.model.Roller;
10 import org.roller.model.RollerFactory;
11 import org.roller.model.ScheduledTask;
12 import org.roller.util.Blacklist;
13
14 /**
15  * @author lance.lavandowska
16  */

17 public class BlacklistUpdateTask extends TimerTask JavaDoc implements ScheduledTask
18 {
19     public void run()
20     {
21         // try reading new def from URL
22
Blacklist.checkForUpdate();
23     }
24     public void init(Roller roller, String JavaDoc realPath) throws RollerException
25     {
26         // load Blacklist from file
27
String JavaDoc uploadDir = RollerFactory.getRoller().getFileManager().getUploadDir();
28         Blacklist.getBlacklist(null, uploadDir);
29         // now have it check for an update
30
Blacklist.checkForUpdate();
31     }
32 }
33
Popular Tags