static private class IntroduceCandidacyResult extends Activity<StandaloneIndividualCandidacyProcess> {
@Override
public void checkPreConditions(StandaloneIndividualCandidacyProcess process, User userView) {
if (!isAllowedToManageProcess(process, userView)) {
throw new PreConditionNotValidException();
}
if (process.isCandidacyCancelled()) {
throw new PreConditionNotValidException();
}
if (!process.isSentToCoordinator() && !process.isSentToScientificCouncil()) {
throw new PreConditionNotValidException();
}
if (process.getCandidacy().getEvent() == null || process.getCandidacy().getEvent().isCancelled()) {
return;
}
if (!process.isCandidacyDebtPayed()) {
throw new PreConditionNotValidException();
}
}