use of org.bimserver.database.actions.GetAllRevisionsOfProjectDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getAllRevisionsOfProject.
@Override
public List<SRevision> getAllRevisionsOfProject(Long poid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Set<Revision>> action = new GetAllRevisionsOfProjectDatabaseAction(session, getInternalAccessMethod(), poid);
List<SRevision> convertToSListRevision = getBimServer().getSConverter().convertToSListRevision(session.executeAndCommitAction(action));
Collections.sort(convertToSListRevision, new SRevisionComparator(true));
return convertToSListRevision;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations