// sort the resulting list by the configured property sorts on the tag
if (StringUtils.isNotEmpty(sorts)) {
Collections.sort(contentItems, new Comparator<StructuredContentDTO>() {
@Override
public int compare(StructuredContentDTO o1, StructuredContentDTO o2) {
AssignationSequence sortAssignments = AssignationUtils.parseAssignationSequence(arguments.getConfiguration(), arguments, sorts, false);
CompareToBuilder compareBuilder = new CompareToBuilder();
for (Assignation sortAssignment : sortAssignments) {
String property = sortAssignment.getLeft().getStringRepresentation();
Object val1 = o1.getPropertyValue(property);
Object val2 = o2.getPropertyValue(property);
if (sortAssignment.getRight().execute(arguments.getConfiguration(), arguments).equals("ASCENDING")) {
compareBuilder.append(val1, val2);
} else {
compareBuilder.append(val2, val1);
}
}
return compareBuilder.toComparison();
}
});
}
List<Map<String, Object>> contentItemFields = new ArrayList<Map<String, Object>>();
for (StructuredContentDTO item : contentItems) {
if (StringUtils.isNotEmpty(fieldFilters)) {
AssignationSequence assignments = AssignationUtils.parseAssignationSequence(arguments.getConfiguration(), arguments, fieldFilters, false);
boolean valid = true;
for (Assignation assignment : assignments) {
if (ObjectUtils.notEqual(assignment.getRight().execute(arguments.getConfiguration(), arguments),
item.getValues().get(assignment.getLeft().getStringRepresentation()))) {