コード例 #1
0
  @Override
  protected void activityPreConditions(PhdThesisProcess process, User userView) {

    if (!process.isJuryValidated()) {
      throw new PreConditionNotValidException();
    }

    if (process.hasState(PhdThesisProcessStateType.WAITING_FOR_JURY_REPORTER_FEEDBACK)) {
      throw new PreConditionNotValidException();
    }

    if (!process.isAllowedToManageProcess(userView)) {
      throw new PreConditionNotValidException();
    }
  }
コード例 #2
0
ファイル: SetFinalGrade.java プロジェクト: joantune/fenix
  @Override
  protected void activityPreConditions(PhdThesisProcess process, IUserView userView) {

    if (!process.isJuryValidated()) {
      throw new PreConditionNotValidException();
    }

    if (process.getActiveState() != PhdThesisProcessStateType.WAITING_FOR_FINAL_GRADE) {
      throw new PreConditionNotValidException();
    }

    if (!process.isAllowedToManageProcess(userView)) {
      throw new PreConditionNotValidException();
    }
  }
コード例 #3
0
  @Override
  protected void activityPreConditions(PhdThesisProcess process, IUserView userView) {

    if (!process.isJuryValidated()) {
      throw new PreConditionNotValidException();
    }

    if (!process.hasState(PhdThesisProcessStateType.WAITING_FOR_JURY_REPORTER_FEEDBACK)) {
      throw new PreConditionNotValidException();
    }

    if (process.isAllowedToManageProcess(userView)) {
      return;
    }

    if (!process.isParticipant(userView.getPerson())) {
      throw new PreConditionNotValidException();
    }

    final ThesisJuryElement element = process.getThesisJuryElement(userView.getPerson());
    if (element == null || !element.getReporter().booleanValue()) {
      throw new PreConditionNotValidException();
    }
  }