@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();
    }
  }
Beispiel #2
0
  @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();
    }
  }
  @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();
    }
  }