1 25 26 package net.killingar.forum.actions.wiki; 27 28 import net.killingar.forum.actions.ActionForumSupport; 29 import net.killingar.forum.internal.managers.TimeManager; 30 31 public class SetSystemTime extends ActionForumSupport 32 { 33 String wiki; 35 String context; 36 37 public void setWiki(String in) { wiki = in; } 39 public void setContext(String in) { context = in; } 40 41 43 protected String doExecute() 44 { 45 try 46 { 47 TimeManager timemgr = (TimeManager)manager.getManager(TimeManager.class.getName()); 48 49 timemgr.setSystemTime(TimeManager.systemWiki); 50 if (context != null) 51 { 52 timemgr.setSystemTime("wiki/"+context); 53 if (wiki != null) 54 timemgr.setSystemTime("wiki/"+context+"/"+wiki); 55 } 56 } 57 catch (Exception e) 58 { 59 e.printStackTrace(); 60 addErrorMessage("failed to set time, exception thrown: "+e); 61 62 return ERROR; 63 } 64 65 return SUCCESS; 66 } 67 } 68 | Popular Tags |