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 import java.util.Map ; 32 33 public class LoadAuthor extends ActionForumSupport implements webwork.action.ParameterAware 34 { 35 java.util.Date time; 37 Map parameters; 38 39 public void setParameters(Map parameters) { this.parameters = parameters; } 41 42 public java.util.Date getTime() { return time; } 44 public String getAuthor() { return Long.toString(manager.getUserID());} 45 46 protected String doExecute() 47 { 48 51 try 52 { 53 try 54 { 55 time = new java.util.Date (Long.parseLong(((String [])parameters.get("time"))[0])); 56 } 57 catch (Exception e){} 58 59 if (time == null) 60 time = ((TimeManager)manager.getManager(TimeManager.class.getName())).getUserTime(TimeManager.systemWiki); 61 } 62 catch (Exception e) 63 { 64 e.printStackTrace(); 65 addErrorMessage("failed to load author, exception thrown: "+e); 66 67 return ERROR; 68 } 69 70 return SUCCESS; 71 } 72 } 73 | Popular Tags |