Пример #1
0
 @Override
 protected void activityPreConditions(PhdProgramCandidacyProcess process, User userView) {
   if (PREVIOUS_STATE.contains(process.getActiveState())) {
     return;
   }
   throw new PreConditionNotValidException();
 }
Пример #2
0
 private void checkType(
     final PhdProgramCandidacyProcess process, final PhdProgramCandidacyProcessState type) {
   final PhdProgramCandidacyProcessState currentType = process.getActiveState();
   if (currentType != null && currentType.equals(type)) {
     throw new DomainException(
         "error.PhdCandidacyProcessState.equals.previous.state", type.getLocalizedName());
   }
 }