Package org.sete.service.project

Examples of org.sete.service.project.ScoreProjectService


            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));

        ScoreProjectService service = getService(ScoreProjectService.class);
        List<ScienceProjectVo> projectsVos = service.loadAllScienceProjects();
        request.setAttribute("projects", projectsVos);

        return mapping.findForward(WebConstants.FORWARD_VIEW);
    }
View Full Code Here


    public ActionForward viewSubmitProjectToAward(ActionMapping mapping,
            ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
       
        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));
        ScoreProjectService service = getService(ScoreProjectService.class);
        ViewProjectsToScoreVo vptsvo = new ViewProjectsToScoreVo();
        BeanUtils.copyProperties(vptsvo, form);
        ScienceProjectVo projectVo = service.loadScienceProject(vptsvo.getProjectId());
        request.setAttribute("project", projectVo);
        request.setAttribute("projectId", vptsvo.getProjectId());
        request.setAttribute("projectName", projectVo.getName());
       
        return mapping.findForward(WebConstants.FORWARD_VIEW);
View Full Code Here

            ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
       
        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));
       
        ScoreProjectService service = getService(ScoreProjectService.class);
        ScoreProjectVo spvo = new ScoreProjectVo();
        BeanUtils.copyProperties(spvo, form);
        spvo.setScorer(getAuthenticatedUser(request).getUserId().toString());
        service.submitProjectToAward(spvo);
        displaySuccessMessage(request,"scienceProject.award.success",true);
        return mapping.findForward(WebConstants.FORWARD_VIEW);
       
    }
View Full Code Here

            ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
       
        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));
       
        ScoreProjectService service = getService(ScoreProjectService.class);
        String projectId = request.getParameter("projectId");
        String awardKey = request.getParameter("awardKey");
        boolean success = service.deleteProjectAward(projectId, awardKey);
        if(success){
            displaySuccessMessage(request,"scienceProject.award.remove.success",success);
        }
        else{
            displaySuccessMessage(request,"scienceProject.award.remove.error",success);
        }
       
        ScienceProjectVo projectVo = service.loadScienceProject(projectId);
        request.setAttribute("project", projectVo);
        request.setAttribute("projectId", projectId);
        request.setAttribute("projectName", projectVo.getName());
       
        return mapping.findForward(WebConstants.FORWARD_VIEW);
View Full Code Here

            throws Exception {

        checkAuthorization(userHasPrivilege(request.getSession(), getJudgePrivileges()));      
       
        String awardType = ((SearchByForm) form).getSearchParam();
        ScoreProjectService service = getService(ScoreProjectService.class);
       
        List<ScienceProjectVo> projects = service.loadAllSciencProjectsFor(awardType, ScienceProjectStatusType.Key.SCORED_KEY);
       
        request.setAttribute("projects", projects);
        request.setAttribute("award", TypeUtil.forKey(AwardType.class, awardType).getLabel());
       
        return mapping.findForward(WebConstants.FORWARD_VIEW);
View Full Code Here

      throws Exception {

    HttpSessionManager.unbindAll(request.getSession());
    checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));

    ScoreProjectService service = getService(ScoreProjectService.class);
    List<ScienceProjectVo> projectVos = service.loadAllScienceProjects();
    HttpSessionManager.bind(request.getSession(), "projects", projectVos);
   
    for(ScienceProjectVo sp : projectVos){
      service.refreshProjectStatus(sp.getId().toString());
    }

        return mapping.findForward(WebConstants.FORWARD_VIEW);
  }
View Full Code Here

    public ActionForward viewSubmitProjectScore(ActionMapping mapping,
      ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
   
        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));
    ScoreProjectService service = getService(ScoreProjectService.class);
    ViewProjectsToScoreVo vptsvo = new ViewProjectsToScoreVo();
    BeanUtils.copyProperties(vptsvo, form);
    vptsvo.setScorer(getAuthenticatedUser(request).getUserId().toString());
    ScienceProjectStatusType spst = ScienceProjectStatusType.forKey(ScienceProjectStatusType.Key.SCORINGINPROGRESS_KEY);
    service.updateProjectStatus(vptsvo.getProjectId(), vptsvo.getScorer(), spst);
   
    HttpSessionManager.bind(request.getSession(), "projectId", vptsvo.getProjectId());
    HttpSessionManager.bind(request.getSession(), "projectName", service.loadScienceProject(vptsvo.getProjectId()).getName());
   
    String stScore = new String();
    if(service.loadScienceProject(vptsvo.getProjectId()).getScore()!=null){
      stScore = service.loadScienceProject(vptsvo.getProjectId()).getScore().toString();
    }
    HttpSessionManager.bind(request.getSession(), "storedScore", stScore);
    return mapping.findForward(WebConstants.FORWARD_VIEW);
   
  }
View Full Code Here

      ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
   
        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));
   
    ScoreProjectService service = getService(ScoreProjectService.class);
    ScoreProjectVo spvo = new ScoreProjectVo();
    BeanUtils.copyProperties(spvo, form);
    spvo.setScorer(getAuthenticatedUser(request).getUserId().toString());
    service.submitProjectScore(spvo);
    displaySuccessMessage(request,"scienceProject.score.success",true);
    return mapping.findForward(WebConstants.FORWARD_VIEW);
   
  }
View Full Code Here

            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

        checkAuthorization(userHasPrivilege(request.getSession(), getPrivileges()));

        ScoreProjectService service = getService(ScoreProjectService.class);
        List<ScienceProjectVo> projectsVos = service.loadAllScienceProjects();
        request.setAttribute("projects", projectsVos);
       
        return mapping.findForward(WebConstants.FORWARD_VIEW);
    }
View Full Code Here

TOP

Related Classes of org.sete.service.project.ScoreProjectService

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.