/*
* Enable a ping target.
*/
public ActionForward enableSelected(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception {
RollerRequest rreq = RollerRequest.getRollerRequest(req);
AutoPingManager autoPingMgr = RollerFactory.getRoller().getAutopingManager();
PingTargetData pingTarget = select(rreq);
try {
if (!isAuthorized(rreq, rreq.getWebsite())) {
return mapping.findForward("access-denied");
}
AutoPingData autoPing = new AutoPingData(null, pingTarget, rreq.getWebsite());
autoPingMgr.saveAutoPing(autoPing);
RollerFactory.getRoller().flush();
return view(mapping, form, req, res);
} catch (Exception e) {
mLogger.error("ERROR in action", e);