1 25 26 29 package net.killingar.forum.actions.comic; 30 31 import net.killingar.forum.internal.Comic; 32 33 public class Add extends ActionComicsSupport 34 { 35 37 Comic comic = new Comic(); 39 boolean confirmed = false; 40 41 43 45 public void setComicID(long in) { comic.ID = in; } 47 public void setConfirmed(boolean in) {confirmed = in; } 48 49 public Comic getComic() { return comic; } 51 52 protected String doExecute() 54 { 55 try 56 { 57 if (!confirmed || "".equals(comic.name) || comic.name == null) 58 { 59 return INPUT; 60 } 61 else 62 { 63 comicmgr.addComic(comic); 64 65 return SUCCESS; 66 } 67 } 68 catch (Exception e) 69 { 70 e.printStackTrace(); 71 addErrorMessage("executing "+getClass().toString()+" action failed, exception thrown: "+e.toString()); 72 return ERROR; 73 } 74 } 75 } 76 | Popular Tags |