public ModelAndView postFeedback( HttpServletRequest request, HttpServletResponse response, ProjectFeedbackVo feedbackVo) throws Exception { if (logger.isDebugEnabled()) { logger.debug( "postExperienceAndFb(HttpServletRequest, HttpServletResponse, ProjectInfoVo) - start"); } ProjectVo projectVo = (ProjectVo) modelAndView.getModel().get("projectVo"); modelAndView = new ModelAndView("volunteer/viewProject"); if (!StringUtil.isNullOrEmpty(feedbackVo.getTitle())) { feedbackVo.setPrjId(projectVo.getPrjId()); projectFeedbackService.createProjectFeedback(feedbackVo); modelAndView.addObject( "riMsg", Messages.getString("message.common.submitreview.msg", new String[] {"Project Feedback"})); } List<ProjectMemberVo> memberList = memberManagementService.getMemberListbyProject(projectVo.getPrjId()); List<ProjectExperienceVo> experienceList = projectExperienceService.getProjectExperienceListbyProjectId(projectVo.getPrjId()); List<ProjectFeedbackVo> feedbackList = projectFeedbackService.getProjectFeedbackListbyProjectId(projectVo.getPrjId()); PagedListHolder feedbackPagedListHolder = new PagedListHolder(feedbackList); if (!feedbackList.isEmpty()) { int page = ServletRequestUtils.getIntParameter(request, "p1", 0); feedbackPagedListHolder.setPage(page); feedbackPagedListHolder.setPageSize(100); } PagedListHolder exPagedListHolder = new PagedListHolder(experienceList); if (!experienceList.isEmpty()) { int page = ServletRequestUtils.getIntParameter(request, "p2", 0); exPagedListHolder.setPage(page); exPagedListHolder.setPageSize(100); } modelAndView.addObject("fbPagedListHolder", feedbackPagedListHolder); modelAndView.addObject("exPagedListHolder", exPagedListHolder); modelAndView.addObject("memberList", memberList); modelAndView.addObject("experienceList", experienceList); modelAndView.addObject("feedbackList", feedbackList); modelAndView.addObject("projectVo", projectVo); modelAndView.addObject("feedbackVo", new ProjectFeedbackVo()); modelAndView.addObject("experienceVo", new ProjectExperienceVo()); if (logger.isDebugEnabled()) { logger.debug( "postExperienceAndFb(HttpServletRequest, HttpServletResponse, ProjectInfoVo) - end"); } return modelAndView; }
public ModelAndView raiseInterest(HttpServletRequest request, HttpServletResponse response) throws Exception { if (logger.isDebugEnabled()) { logger.debug("raiseInterest(HttpServletRequest, HttpServletResponse) - start"); } ProjectVo projectVo = (ProjectVo) modelAndView.getModel().get("projectVo"); if (logger.isDebugEnabled()) { logger.debug( "raiseInterest(HttpServletRequest, HttpServletResponse) - @@@@@@@@@@@@@@raiseInterest@@@@@@@@@:" + projectVo.getPrjId()); } ProjectInterestVo projectInterestVo = new ProjectInterestVo(); projectInterestVo.setPrjId(projectVo.getPrjId()); String loginId = UserUtil.getUserSessionInfoVo().getUserID(); List<ProjectInterestVo> projectInterestVos = projectInterestService.getProjectInterestListbyProjectIdAndUserId( projectVo.getPrjId(), loginId); if (projectInterestVos.size() == 0) { projectInterestService.createProjectInterest(projectInterestVo); if (logger.isDebugEnabled()) { logger.debug( "raiseInterest(HttpServletRequest, HttpServletResponse) - @@@@@@@@@@@@@@successfully raise new project interest@@@@@@@@@:" + projectVo.getPrjId()); } modelAndView.addObject( "riMsg", Messages.getString("message.common.submit.msg", new String[] {"Project Interest"})); } else { modelAndView.addObject( "riMsg", Messages.getString("message.common.submit.adi.msg", new String[] {"Project Interest"})); } if (logger.isDebugEnabled()) { logger.debug("raiseInterest(HttpServletRequest, HttpServletResponse) - end"); } return modelAndView; }
public ModelAndView requestCertificate(HttpServletRequest request, HttpServletResponse response) throws Exception { if (logger.isDebugEnabled()) { logger.debug("requestCertificate(HttpServletRequest, HttpServletResponse) - start"); } ProjectVo projectVo = (ProjectVo) modelAndView.getModel().get("projectVo"); if (logger.isDebugEnabled()) { logger.debug( "requestCertificate(HttpServletRequest, HttpServletResponse) - @@@@@@@@@@@@@@requestCertificate@@@@@@@@@: " + projectVo.getPrjId()); } String loginId = UserUtil.getUserSessionInfoVo().getUserID(); List<CertificateRequestVo> certificateRequestDtos = certificateManagementService.getCertificateRequestsbyProject(projectVo.getPrjId(), loginId); if (certificateRequestDtos.size() == 0) { certificateManagementService.createIndividualCertificateRequest(projectVo.getPrjId()); modelAndView.addObject( "riMsg", Messages.getString("message.common.submit.msg", new String[] {"Certificate Request"})); } else { modelAndView.addObject( "riMsg", Messages.getString( "message.common.submit.adi.msg", new String[] {"Certificate Request"})); } if (logger.isDebugEnabled()) { logger.debug( "requestCertificate(HttpServletRequest, HttpServletResponse) - @@@@@@@@@@@@@@successfully reqCertifictae@@@@@@@@@:" + projectVo.getPrjId()); logger.debug("requestCertificate(HttpServletRequest, HttpServletResponse) - start"); } return modelAndView; }
public ModelAndView viewProjectDetails(HttpServletRequest request, HttpServletResponse response) throws Exception { if (logger.isDebugEnabled()) { logger.debug("viewProjectDetails(HttpServletRequest, HttpServletResponse) - start"); } long prjId = Long.parseLong(request.getParameter("prjId")); if (prjId <= 0) { if (logger.isDebugEnabled()) { logger.debug("viewProjectDetails(HttpServletRequest, HttpServletResponse) - end"); } return modelAndView; } ProjectVo projectVo = projectManagementService.getProjectbyId(prjId); List<CodeLookupVo> roleCodeList = CodeLookupUtil.getCodeListByCategory(VMSConstants.MEMBER_ROLE); List<ProjectMemberVo> memberList = memberManagementService.getMemberListbyProject(projectVo.getPrjId()); List<ProjectExperienceVo> experienceList = projectExperienceService.getProjectExperienceListbyProjectId(projectVo.getPrjId()); List<ProjectFeedbackVo> feedbackList = projectFeedbackService.getProjectFeedbackListbyProjectId(projectVo.getPrjId()); modelAndView = new ModelAndView("volunteer/viewProject"); PagedListHolder feedbackPagedListHolder = new PagedListHolder(feedbackList); if (!feedbackList.isEmpty()) { int page = ServletRequestUtils.getIntParameter(request, "p1", 0); feedbackPagedListHolder.setPage(page); feedbackPagedListHolder.setPageSize(100); } PagedListHolder exPagedListHolder = new PagedListHolder(experienceList); if (!experienceList.isEmpty()) { int page = ServletRequestUtils.getIntParameter(request, "p2", 0); exPagedListHolder.setPage(page); exPagedListHolder.setPageSize(100); } modelAndView.addObject("fbPagedListHolder", feedbackPagedListHolder); modelAndView.addObject("exPagedListHolder", exPagedListHolder); modelAndView.addObject("projectVo", projectVo); modelAndView.addObject("memberList", memberList); modelAndView.addObject("feedbackVo", new ProjectFeedbackVo()); modelAndView.addObject("experienceVo", new ProjectExperienceVo()); for (ProjectMemberVo projectMemberVo : memberList) { for (CodeLookupVo codeLookupVo : roleCodeList) { if (codeLookupVo.getCdId().equals(Long.valueOf(projectMemberVo.getRoleCd()))) { projectMemberVo.setRoleCd(codeLookupVo.getVal()); break; } } } if (logger.isDebugEnabled()) { logger.debug( "viewProjectDetails(HttpServletRequest, HttpServletResponse) - Total memebr:" + memberList.size()); logger.debug("viewProjectDetails(HttpServletRequest, HttpServletResponse) - end"); } return modelAndView; }