Mercurial > hg > Database > jungle-network
changeset 140:09b405d0830b
Removed EditMessageUseGetServlet
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 24 Jan 2014 17:42:17 +0900 |
parents | c1d75b031b15 |
children | 7ce940e454f0 |
files | src/main/java/app/bbs/EditMessageUseGetServlet.java src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java |
diffstat | 2 files changed, 1 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/app/bbs/EditMessageUseGetServlet.java Thu Jan 23 21:46:40 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -package app.bbs; - -import java.io.PrintWriter; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.BulletinBoard; - -public class EditMessageUseGetServlet extends HttpServlet{ - private final BulletinBoard bbs; - private static final String PARAM_BOARD_NAME = "bname"; - private static final String PARAM_BOARD_MSGID = "uuid"; - private static final String PARAM_BOARD_AUTHOR = "author"; - private static final String PARAM_BOARD_MESSAGE= "msg"; - private static final String PARAM_BOARD_EDITKEY = "key"; - - private static final long serialVersionUID = 1L; - - public EditMessageUseGetServlet(BulletinBoard _bbs) - { - bbs = _bbs; - } - - public void doGet(HttpServletRequest _req,HttpServletResponse _res) - { - String boardName = _req.getParameter(PARAM_BOARD_NAME); - String author = _req.getParameter(PARAM_BOARD_AUTHOR); - String msg = _req.getParameter(PARAM_BOARD_MESSAGE); - String key = _req.getParameter(PARAM_BOARD_EDITKEY); - String uuid = _req.getParameter(PARAM_BOARD_MSGID); - - try{ - bbs.editMessage(boardName, uuid, author, msg, key); - PrintWriter pw = _res.getWriter(); - pw.write("successfully written"); - pw.flush(); - }catch(Exception _e){ - _res.setStatus(500); - } - } -}
--- a/src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java Thu Jan 23 21:46:40 2014 +0900 +++ b/src/main/java/app/bbs/codesegment/StartBBSCodeSegment.java Fri Jan 24 17:42:17 2014 +0900 @@ -8,6 +8,7 @@ import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.CreateBoardMessageServlet; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.CreateBoardServlet; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.EditMessageServlet; +import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.EditMessageUseGetServlet; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.ShowBoardMessageServlet; import jp.ac.u_ryukyu.ie.cr.shoshi.jungle.bbs.ShowBoardsServlet; @@ -18,7 +19,6 @@ import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; -import app.bbs.EditMessageUseGetServlet; import app.bbs.NetworkBulletinBoard; import app.bbs.NetworkJungleBulletinBoard;