update.java
来自「新闻发布系统」· Java 代码 · 共 77 行
JAVA
77 行
/*
* Update.java
*
* Created on 2007年3月18日, 下午1:36
*/
package News.Struts.Action;
import News.Struts.ActionForm.SiteSettingActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.actions.DispatchAction;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import News.ProcessData.UpdateModel;
import News.Struts.ActionForm.MapActionForm;
/**
*
* @author Owner
* @version
*/
public class Update extends DispatchAction {
public ActionForward UpdateLink(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateLink((String)maf.getMapBack("Name"),(String)maf.getMapBack("URL"),(String)maf.getMapBack("Logo"),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateNotice(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateNotice(maf.getContent(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateCatalog(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateCatalog(maf.getContent(),maf.getLogoURL(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
public ActionForward UpdateNews(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
UpdateModel up=new UpdateModel();
MapActionForm maf=(MapActionForm)form;
if(up.UpdateNews(maf.getTitle(),maf.getAuthor(),maf.getContent(),maf.getId()))
{
return mapping.findForward("success");
}else {return mapping.findForward("failure");}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?