sortDescriptor = new SortDescriptor(
getSort().getProperty(), getSort().isAscending(), localeService.getCurrentLanguage());
}
Contract contract = (Contract) getDefaultModelObject();
String searchQuery = filter != null ? filter.getSearchQuery() : null;
ResourcesCriteria resCrit = new ResourcesCriteria();
resCrit.setQuery(searchQuery);
if(filter != null && filter.isUserResourcesOnly()) {
Integer currentUserId = authorizedUserService.getCurrentUserId();
resCrit.setResourceOwnerId(currentUserId);
resCrit.setResourcesParticipantId(currentUserId);
}
SlicingDataSet<Resource> dataSet = resourceReader.getContractResources(
contract.getId(), sortDescriptor, resCrit);
return dataSet;
}