+ " in conceptId attribute value. Parameters: " + parameters);
} else {
concepts = new ArrayList<Concept>();
for (StringTokenizer st = new StringTokenizer(conceptIds, ","); st.hasMoreTokens();) {
String s = st.nextToken().trim();
Concept concept = HtmlFormEntryUtil.getConcept(s);
if (concept == null)
throw new IllegalArgumentException("Cannot find concept for value " + s
+ " in conceptIds attribute value. Parameters: " + parameters);
concepts.add(concept);
}
if (concepts.size() == 0)
throw new IllegalArgumentException(
"You must provide some valid conceptIds for the conceptIds attribute. Parameters: " + parameters);
}
// test to make sure the answerConceptId, if it exists, is valid
String answerConceptId = parameters.get("answerConceptId");
if (StringUtils.isNotBlank(answerConceptId)) {
if (HtmlFormEntryUtil.getConcept(answerConceptId) == null)
throw new IllegalArgumentException("Cannot find concept for value " + answerConceptId
+ " in answerConceptId attribute value. Parameters: " + parameters);
}
// test to make sure the answerConceptIds, if they exist, are valid
String answerConceptIds = parameters.get("answerConceptIds");
if (StringUtils.isNotBlank(answerConceptIds)) {
for (StringTokenizer st = new StringTokenizer(answerConceptIds, ","); st.hasMoreTokens();) {
String s = st.nextToken().trim();
Concept concept = HtmlFormEntryUtil.getConcept(s);
if (concept == null)
throw new IllegalArgumentException("Cannot find concept for value " + s
+ " in answerConceptIds attribute value. Parameters: " + parameters);
}
}