Package org.cipres.treebase.domain.study

Examples of org.cipres.treebase.domain.study.Analysis


        return resultView;
      }

      // determine which analysis we are dealing with
      String analysis_id = ServletRequestUtils.getStringParameter(request,"analysis_id",null);
      Analysis analysis = mAnalysisService.findByID(Long.parseLong(analysis_id));
      analysis.addAnalysisStep(analysisStep);

      mAnalysisService.update(analysis);
      if ( redirectView == null ) {
        return new ModelAndView("redirect:/user/analyzedDataForm.html" + "?analysis_step_id="
          + analysisStep.getId().toString());
View Full Code Here


    HttpServletRequest request,
    HttpServletResponse response,
    Object command,
    BindException errors) throws Exception {

    Analysis analysis = (Analysis) command;

    Long study_id = ControllerUtil.getStudyId(request);
    Study study = mStudyService.findByID(study_id);
    String redirectView = request.getParameter("redirect");
View Full Code Here

    if (TreebaseUtil.isEmpty(analysis_id)) {
      if (perm == TBPermission.WRITE) {
        LOGGER.info("setAuthorizationChecked(true)");
        setAuthorizationChecked(true);
        return new Analysis();
      } else {
        LOGGER.info("setAuthorizationChecked(false)");
        setAuthorizationChecked(false);
        return null;
      }
    } else {
      long analysis_id_long = Long.parseLong(analysis_id);
      TBPermission perm2 = getAnalysisService().getPermission(username, analysis_id_long);
      if (perm2 == TBPermission.WRITE || perm2 == TBPermission.READ_ONLY
        || perm2 == TBPermission.SUBMITTED_WRITE) {

        Analysis analysis = mAnalysisService.findByID(analysis_id_long);
        ControllerUtil.saveAnalysis(request, analysis);

        if (perm2 == TBPermission.READ_ONLY) {
          // FIXME set a session variable to hide the edit buttons.

        }
        LOGGER.info("setAuthorizationChecked(true)");
        setAuthorizationChecked(true);
        return analysis;
      } else {
        LOGGER.debug("NULL CONDITION SATISFIED");
        LOGGER.info("setAuthorizationChecked(false)");
        setAuthorizationChecked(false);
        return new Analysis();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.study.Analysis

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.