List biparams = object.getBiObjectParameters();
if (biparams.size() == 0)
return toReturn;
Iterator iterParams = biparams.iterator();
while (iterParams.hasNext()) {
BIObjectParameter biparam = (BIObjectParameter) iterParams.next();
logger.debug("Evaluating errors for biparameter " + biparam.getLabel() + " ...");
List errorsOnChecks = getValidationErrorsOnChecks(biparam);
if (errorsOnChecks != null && errorsOnChecks.size() > 0) {
logger.warn("Found " + errorsOnChecks.size() + " errors on checks for biparameter " + biparam.getLabel());
}
toReturn.addAll(errorsOnChecks);
List values = biparam.getParameterValues();
if (values != null && values.size() >= 1 &&
!(values.size() == 1 && ( values.get(0) == null || values.get(0).toString().trim().equals("") ) )) {
List errorsOnValues = getValidationErrorsOnValues(biparam);
if (errorsOnValues != null && errorsOnValues.size() > 0) {
logger.warn("Found " + errorsOnValues.size() + " errors on values for biparameter " + biparam.getLabel());
}
toReturn.addAll(errorsOnValues);
}
boolean hasValidValues = false;
// if parameter has values and there are no errors, the parameter has valid values
if (values != null && values.size() > 0 && toReturn.isEmpty()) {
hasValidValues = true;
}
biparam.setHasValidValues(hasValidValues);
}
logger.debug("OUT");
return toReturn;
}