use of org.olat.core.util.ValidationStatus in project openolat by klemens.
the class AddOpenIDConnectIFFullConfigurableController method validateFormLogic.
@Override
protected boolean validateFormLogic(UserRequest ureq) {
boolean allOk = true;
allOk &= validate(openIdConnectIFName);
List<ValidationStatus> nameValidation = new ArrayList<ValidationStatus>();
openIdConnectIFName.validate(nameValidation);
allOk &= nameValidation.isEmpty();
allOk &= validate(openIdConnectIFDisplayName);
allOk &= validate(openIdConnectIFApiKeyEl);
allOk &= validate(openIdConnectIFApiSecretEl);
allOk &= validate(openIdConnectIFIssuerEl);
allOk &= validate(openIdConnectIFAuthorizationEndPointEl);
String providerName = openIdConnectIFName.getValue();
if (StringHelper.containsNonWhitespace(providerName)) {
OAuthSPI existingSpi = oauthModule.getProvider(providerName);
if (existingSpi != null) {
openIdConnectIFName.setErrorKey("error.duplicate.provider", null);
allOk &= false;
}
}
return allOk & super.validateFormLogic(ureq);
}
Aggregations