static private class CancelCandidacy extends Activity<MobilityIndividualApplicationProcess> {
@Override
public void checkPreConditions(MobilityIndividualApplicationProcess process, User userView) {
if (!isAllowedToManageProcess(process, userView) && !isInternationalRelationsOfficer(userView)) {
throw new PreConditionNotValidException();
}
if (process.isCandidacyCancelled() || !process.isCandidacyInStandBy() || process.hasAnyPaymentForCandidacy()) {
throw new PreConditionNotValidException();
}
}