use of org.bimserver.webservices.SRevisionComparator in project BIMserver by opensourceBIM.
the class ServiceImpl method getAllRevisionsByUser.
@Override
public List<SRevision> getAllRevisionsByUser(Long uoid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Set<Revision>> action = new GetAllRevisionsByUserDatabaseAction(session, getInternalAccessMethod(), uoid);
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();
}
}
use of org.bimserver.webservices.SRevisionComparator 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