1 25 26 29 package net.killingar.forum.actions.comic; 30 31 import net.killingar.Utils; 32 import net.killingar.forum.internal.managers.ComicManager; 33 import net.killingar.forum.internal.managers.ForumManager; 34 import webwork.action.ServletActionContext; 35 36 import java.util.Properties ; 37 38 public class Update extends ActionComicsSupport 39 { 40 42 44 46 48 50 52 protected String doExecute() 54 { 55 try 56 { 57 System.err.println("executing comic.Update"); 58 59 if (ServletActionContext.getServletContext() == null) 60 { 61 Properties prop = Utils.getProperties(); 62 63 manager = new ForumManager(); 64 manager.login((String )prop.get("net.killingar.forum.username"), (String )prop.get("net.killingar.forum.password")); 65 comicmgr = (ComicManager)manager.getManager(ComicManager.class.getName()); 66 } 67 net.killingar.forum.comics.ComicsUpdater.updateAll(comicmgr); 68 } 69 catch (Exception e) 70 { 71 e.printStackTrace(); 72 addErrorMessage("executing "+getClass().toString()+" action failed, exception thrown: "+e.toString()); 73 return ERROR; 74 } 75 76 return SUCCESS; 77 } 78 } 79 | Popular Tags |