KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > geinuke > module > pmessage > ShowReceived


1 package com.geinuke.module.pmessage;
2
3 import java.util.Locale JavaDoc;
4
5 import javax.servlet.http.HttpServletRequest JavaDoc;
6 import javax.servlet.http.HttpServletResponse JavaDoc;
7
8 import org.apache.velocity.context.Context;
9
10 import com.geinuke.common.GlobalConfigurationI;
11 import com.geinuke.common.NukeModuleI;
12 import com.geinuke.common.PageTool;
13 import com.geinuke.common.UserI;
14 import com.geinuke.middle.IPMessageBL;
15 /*
16 -- GeiNuke --
17 Copyright (c) 2005 by Roberto Sidoti [geinuke@users.sourceforge.net]
18 http://www.hostingjava.it/-geinuke/
19
20 This file is part of GeiNuke.
21
22    GeiNuke is free software; you can redistribute it and/or modify
23    it under the terms of the GNU General Public License as published by
24    the Free Software Foundation; either version 2 of the License, or
25    (at your option) any later version.
26
27    GeiNuke is distributed in the hope that it will be useful,
28    but WITHOUT ANY WARRANTY; without even the implied warranty of
29    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30    GNU General Public License for more details.
31
32    You should have received a copy of the GNU General Public License
33    along with GeiNuke; if not, write to the Free Software
34    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
35 */

36 import com.geinuke.module.StaticModule;
37 import com.geinuke.servlet.GeiServlet;
38 import com.geinuke.util.NukeResource;
39 import com.geinuke.vo.ModuleDBVO;
40 import com.geinuke.vo.PMessageVO;
41
42 public class ShowReceived extends StaticModule{
43     
44     
45     public NukeModuleI handleAction(ModuleDBVO module, Context ctx,HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res, UserI user, GlobalConfigurationI gConf) throws Exception JavaDoc {
46         
47         IPMessageBL ml=(IPMessageBL)GeiServlet.getBL("IPMessageBL");
48         int id=Integer.parseInt(req.getParameter("pid"));
49         PMessageVO mes=ml.getPMessageById(id);
50         ml.setSeenMessage(mes.getIdPM());
51         Locale JavaDoc lo=NukeResource.getLocale(req,res);
52         ctx.put("pageTool",new PageTool(lo));
53         ctx.put("mes",mes);
54         return super.handleAction(module,ctx,req,res,user,gConf);
55     }
56
57 }
Popular Tags