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