static private class IntroduceCandidacyResult extends Activity<SecondCycleIndividualCandidacyProcess> {
@Override
public void checkPreConditions(SecondCycleIndividualCandidacyProcess process, User userView) {
if (!isAllowedToManageProcess(process, userView) && !userView.getPerson().hasRole(RoleType.COORDINATOR)) {
throw new PreConditionNotValidException();
}
if (process.isCandidacyCancelled()) {
throw new PreConditionNotValidException();
}
if (!process.isCandidacyDebtPayed()) {
throw new PreConditionNotValidException();
}
if (!process.isSentToCoordinator()) {
throw new PreConditionNotValidException();
}
}