Package org.jresearch.gossip.forms

Examples of org.jresearch.gossip.forms.AttachmentInfoForm


            HttpServletRequest request, HttpServletResponse response)
            throws JGossipException {
        HttpSession session = request.getSession();
        User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
        ForumDAO dao = ForumDAO.getInstance();
        AttachmentInfoForm aiForm = (AttachmentInfoForm) form;
       
        try {
            boolean isUserMod = dao.checkMod(Integer.parseInt(aiForm.getFid()),
                    user);
            //          check user access rights
            getServlet().log("check user access rights ");
            if (isUserMod) {
                FileDataInfo fInfo = new FileDataInfo();
                BeanUtils.copyProperties(fInfo, aiForm);
                dao.updateAttachmentInfo(fInfo);
            } else {
                return (mapping.findForward(IConst.TOKEN.DENIED));
            }

        } catch (NumberFormatException e) {
            throw new SystemException(e);
        } catch (SQLException e) {
            throw new SystemException(e);
        } catch (IllegalAccessException e) {
            throw new SystemException(e);
        } catch (InvocationTargetException e) {
            throw new SystemException(e);
        }
        StringBuffer forward = new StringBuffer();
        forward.append("/ShowMessage.do?fid=");
        forward.append(aiForm.getFid());
        forward.append("&tid=");
        forward.append(aiForm.getTid());
        forward.append("&mid=");
        forward.append(aiForm.getMid());
        return (new ActionForward(forward.toString(), true));

    }
View Full Code Here


                    forward.append("&mid=");
                    forward.append(paForm.getMid());
                    return (new ActionForward(forward.toString(), true));
                }
               
                AttachmentInfoForm aiForm=new AttachmentInfoForm();
                BeanUtils.copyProperties(aiForm,paForm);
                BeanUtils.copyProperties(aiForm,fInfo);
                request.setAttribute("attachmentInfoForm",aiForm);
            } else {
                return (mapping.findForward(IConst.TOKEN.DENIED));
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.forms.AttachmentInfoForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.