1 25 26 package net.killingar.forum.actions.hotlist; 27 28 import webwork.action.ParameterAware; 29 30 import java.util.Map ; 31 32 public class Remove extends ActionHotlistSupport 33 implements ParameterAware 34 { 35 long areaID = -1; 36 Map parameters; 37 38 public void setAreaID(String s) { areaID = Long.parseLong(s); } 39 public void setParameters(Map map) { parameters = map; } 40 41 protected String doExecute() 42 { 43 try 44 { 45 super.areaHotlistmgr.removeArea(areaID, 0L); 46 super.areaHotlistmgr.removeArea(areaID, 1L); 47 48 return SUCCESS; 49 } 50 catch(Exception exception) 51 { 52 addErrorMessage("removing area from hotlist failed, exception thrown (" + exception.toString() + ")"); 53 exception.printStackTrace(); 54 55 return ERROR; 56 } 57 } 58 59 protected void doValidation() 60 { 61 if(areaID == -1) 62 addErrorMessage("no area id specified"); 63 } 64 } 65 | Popular Tags |