/** * Process the specified HTTP request, and create the corresponding HTTP response (or forward to * another web component that will create it). Return an <code>ActionForward</code> instance * describing where and how control should be forwarded, or <code>null</code> if the response has * already been completed. * * @param form * @param req * @param res * @param mapping The ActionMapping used to select this instance * @exception IOException if an input/output error occurs * @exception ServletException if a servlet exception occurs * @return destination */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ActionMessages errors = new ActionMessages(); ActionForward destination = null; if (!this.checkLogon(req)) { return mapping.findForward("logon"); } Integer action; try { action = Integer.parseInt(req.getParameter("action")); } catch (Exception e) { action = BlacklistAction.ACTION_LIST; } AgnUtils.logger().info("Action: " + action); try { destination = executeIntern(mapping, req, errors, destination, action); } catch (Exception e) { AgnUtils.logger().error("execute: " + e + "\n" + AgnUtils.getStackTrace(e)); errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.exception")); } // Report any errors we have discovered back to the original form if (!errors.isEmpty()) { saveErrors(req, errors); } return destination; }
/** * Setter for property linkName. * * @param name New value of property linkName. */ public void setLinkName(String name) { if (tracklink != null) { tracklink.setShortname(name); } else { AgnUtils.logger().error("setLinkName: Trying to set name for invalid tracklink"); } }
/** Setter for property linkUrl. */ public void setLinkUrl(String linkURL) { if (tracklink != null) { tracklink.setFullUrl(linkURL); } else { AgnUtils.logger().error("setLinkUrl: Trying to set url for invalid tracklink"); } }