use of org.bimserver.webservices.SServiceComparator in project BIMserver by opensourceBIM.
the class ServiceImpl method getAllServicesOfProject.
@Override
public List<org.bimserver.interfaces.objects.SService> getAllServicesOfProject(Long poid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Set<org.bimserver.models.store.Service>> action = new GetAllServicesOfProjectDatabaseAction(session, getInternalAccessMethod(), poid);
List<org.bimserver.interfaces.objects.SService> convertToSListRevision = getBimServer().getSConverter().convertToSListService(session.executeAndCommitAction(action));
Collections.sort(convertToSListRevision, new SServiceComparator());
return convertToSListRevision;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations