KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > webui > actions > app > RemoveConsoleAlertAction


1 /**
2 * Copyright (c) 2004-2005 jManage.org
3 *
4 * This is a free software; you can redistribute it and/or
5 * modify it under the terms of the license at
6 * http://www.jmanage.org.
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */

14 package org.jmanage.webui.actions.app;
15
16 import org.apache.struts.action.ActionForm;
17 import org.apache.struts.action.ActionMapping;
18 import org.apache.struts.action.ActionForward;
19 import org.jmanage.webui.util.WebContext;
20 import org.jmanage.webui.actions.BaseAction;
21 import org.jmanage.core.services.AlertService;
22 import org.jmanage.core.services.ServiceFactory;
23
24 import javax.servlet.http.HttpServletResponse JavaDoc;
25 import javax.servlet.http.HttpServletRequest JavaDoc;
26
27 /**
28  *
29  * <p>
30  * Date: Aug 8, 2005
31  * @author Rakesh Kalra
32  */

33 public class RemoveConsoleAlertAction extends BaseAction {
34
35     public ActionForward execute(WebContext context,
36                                  ActionMapping mapping,
37                                  ActionForm actionForm,
38                                  HttpServletRequest JavaDoc request,
39                                  HttpServletResponse JavaDoc response)
40         throws Exception JavaDoc{
41
42         AlertService alertService = ServiceFactory.getAlertService();
43         alertService.removeConsoleAlert(context.getServiceContext(),
44                 request.getParameter("alertId"));
45         return mapping.findForward("success");
46     }
47 }
Popular Tags