SortCriterion[] orderByCriteria;
try {
orderByCriteria = SortCriterion.valueOf(orderBy);
} catch (Exception ex) {
throw new ContentDirectoryException(
ContentDirectoryErrorCode.UNSUPPORTED_SORT_CRITERIA,
ex.toString());
}
try {
return search(objectId, searchCriteria,
filter, firstResult.getValue(), maxResults.getValue(),
orderByCriteria);
} catch (Exception ex) {
throw new ContentDirectoryException(ErrorCode.ACTION_FAILED,
ex.toString());
}
}