コード例 #1
0
 public String addContext() {
   try {
     checkCourseGroup();
     checkCurricularCourse();
     checkCurricularSemesterAndYear();
     AddContextToCurricularCourse.run(
         getCurricularCourse(),
         getCourseGroup(),
         getBeginExecutionPeriodID(),
         getFinalEndExecutionPeriodID(),
         getCurricularYearID(),
         getCurricularSemesterID());
     addInfoMessage(BundleUtil.getString(Bundle.BOLONHA, "addedNewContextToCurricularCourse"));
   } catch (FenixActionException e) {
     this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
     return "";
   } catch (FenixServiceException e) {
     this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
     return "";
   } catch (DomainException e) {
     addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage(), e.getArgs()));
     return "";
   } catch (Exception e) {
     this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, "general.error"));
     return "buildCurricularPlan";
   }
   setContextID(null); // resetContextID
   return "buildCurricularPlan";
 }
コード例 #2
0
 public String editCurricularCourse() {
   try {
     runEditCurricularCourse();
     addInfoMessage(BundleUtil.getString(Bundle.BOLONHA, "curricularCourseEdited"));
   } catch (FenixServiceException e) {
     addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
   } catch (FenixActionException e) {
     addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
   }
   setContextID(null); // resetContextID
   return "";
 }
コード例 #3
0
 public String editContext() {
   try {
     checkCourseGroup();
     EditContextFromCurricularCourse.run(
         getCurricularCourse(),
         getContext(getContextID()),
         getCourseGroup(),
         getCurricularYearID(),
         getCurricularSemesterID(),
         getBeginExecutionPeriodID(),
         getFinalEndExecutionPeriodID());
   } catch (IllegalDataAccessException e) {
     this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, "error.notAuthorized"));
   } catch (DomainException e) {
     addErrorMessage(BundleUtil.getString(Bundle.DOMAIN_EXCEPTION, e.getMessage()));
   } catch (FenixActionException e) {
     addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
   }
   setContextID(null); // resetContextID
   return "";
 }
コード例 #4
0
  public String createCurricularCourse() {
    try {
      checkCourseGroup();
      checkCurricularSemesterAndYear();
      runCreateCurricularCourse();

    } catch (FenixActionException e) {
      this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
      return "";
    } catch (FenixServiceException e) {
      this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, e.getMessage()));
      return "";
    } catch (DomainException e) {
      addErrorMessage(BundleUtil.getString(Bundle.DOMAIN_EXCEPTION, e.getMessage()));
      return "";
    } catch (Exception e) {
      this.addErrorMessage(BundleUtil.getString(Bundle.BOLONHA, "general.error"));
      return "buildCurricularPlan";
    }
    addInfoMessage(BundleUtil.getString(Bundle.BOLONHA, "curricularCourseCreated"));
    return "buildCurricularPlan";
  }