annotate src/main/java/app/bbs/thinks/createAttributeMatrix.java @ 176:6f104ab4eb81

fit jungle core but editMessage is not work
author tatsuki
date Mon, 01 Sep 2014 00:04:32 +0900
parents 066f58e93a14
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
165
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
1 package app.bbs.thinks;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
2
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
3 import java.io.PrintWriter;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
4
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
5 import javax.servlet.http.HttpServlet;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
6 import javax.servlet.http.HttpServletRequest;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
7 import javax.servlet.http.HttpServletResponse;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
8
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
9 import app.bbs.NetworkBulletinBoard;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
10
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
11 public class createAttributeMatrix extends HttpServlet
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
12 {
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
13 private final NetworkBulletinBoard bbs;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
14 private static final String PARAM_BOARD_NAME = "bname";
172
d483caeabffc change request id
tatsuki
parents: 165
diff changeset
15 private static final String PARAM_NODE_PATH = "path";
165
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
16 private static final String PARAM_BOARD_AUTHOR = "author";
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
17 private static final String PARAM_BOARD_MESSAGE= "msg";
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
18 private static final String PARAM_BOARD_EDITKEY = "key";
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
19
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
20 private static final long serialVersionUID = 1L;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
21
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
22 public createAttributeMatrix(NetworkBulletinBoard _bbs)
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
23 {
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
24 bbs = _bbs;
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
25 }
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
26
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
27
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
28
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
29 public void doPost(HttpServletRequest _req,HttpServletResponse _res)
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
30 {
174
066f58e93a14 remove StringEscapeUtils.unescapeHtml
tatsuki
parents: 173
diff changeset
31 String boardName = (_req.getParameter(PARAM_BOARD_NAME));
066f58e93a14 remove StringEscapeUtils.unescapeHtml
tatsuki
parents: 173
diff changeset
32 String author = (_req.getParameter(PARAM_BOARD_AUTHOR));//not use
066f58e93a14 remove StringEscapeUtils.unescapeHtml
tatsuki
parents: 173
diff changeset
33 String msg = (_req.getParameter(PARAM_BOARD_MESSAGE));
066f58e93a14 remove StringEscapeUtils.unescapeHtml
tatsuki
parents: 173
diff changeset
34 String key = (_req.getParameter(PARAM_BOARD_EDITKEY)); // not use
066f58e93a14 remove StringEscapeUtils.unescapeHtml
tatsuki
parents: 173
diff changeset
35 String uuid = (_req.getParameter(PARAM_NODE_PATH));
165
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
36 try{
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
37 bbs.createAttribute(boardName, uuid, author, msg, key);
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
38 PrintWriter pw = _res.getWriter();
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
39 pw.write("successfully written");
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
40 pw.flush();
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
41 }catch(Exception _e){
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
42 _res.setStatus(500);
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
43 }
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
44 }
b3d5fbe95b9a Create Folder Method
tatsuki
parents:
diff changeset
45 }