for (int i = 0; i < contents.length; i++) {
String content = contents[i];
Condition c = new Condition(content);
List<String> params = c.getParamNames();
for (final String paramName : params) {
RestrictField param = pattern.getObject().getField(paramName);
String value = restriction.getItem(param);
if (StringUtils.isNotEmpty(value)) {
if (value.equals(Restriction.ALL)) {
content = "";
} else {
content = StringUtils.replace(content, ":" + param.getName(), ":"
+ param.getName() + index);
paramValues.add(getValue(restriction,param));
}
} else {
throw new RuntimeException(paramName + " had not been initialized");
}