use of org.bimserver.database.actions.GetAllServicesOfProjectDatabaseAction 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(OperationType.READ_ONLY);
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