in custos-services/custos-core-services/iam-admin-core-service/src/main/java/org/apache/custos/iam/validator/IAMInputValidator.java [157:192]
private boolean validateSetUPTenant(Object obj) {
if (obj instanceof SetUpTenantRequest) {
SetUpTenantRequest request = (SetUpTenantRequest) obj;
if (request.getTenantId() == 0) {
throw new MissingParameterException("Tenant Id should not be null", null);
}
if (request.getAdminFirstname() == null || request.getAdminFirstname().trim().equals("")) {
throw new MissingParameterException("Admin firstname should not be null", null);
}
if (request.getAdminLastname() == null || request.getAdminLastname().trim().equals("")) {
throw new MissingParameterException("Admin lastname should not be null", null);
}
if (request.getAdminEmail() == null || request.getAdminEmail().trim().equals("")) {
throw new MissingParameterException("Admin email should not be null", null);
}
if (request.getAdminPassword() == null || request.getAdminPassword().trim().equals("")) {
throw new MissingParameterException("Admin password should not be null", null);
}
if (request.getAdminUsername() == null || request.getAdminUsername().trim().equals("")) {
throw new MissingParameterException("Admin username should not be null", null);
}
if (request.getTenantName() == null || request.getTenantName().trim().equals("")) {
throw new MissingParameterException("Tenant name should not be null", null);
}
if (request.getTenantURL() == null || request.getTenantURL().trim().equals("")) {
throw new MissingParameterException("Tenant URL should not be null", null);
}
if (request.getRequesterEmail() == null || request.getRequesterEmail().trim().equals("")) {
throw new MissingParameterException("Tenant requester email should not be null", null);
}
}
return true;
}