use of org.bimserver.database.actions.GetLogsDatabaseAction in project BIMserver by opensourceBIM.
the class AdminServiceImpl method getLogs.
@Override
public List<SLogAction> getLogs() throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession(OperationType.READ_ONLY);
try {
BimDatabaseAction<List<LogAction>> action = new GetLogsDatabaseAction(session, getInternalAccessMethod(), getAuthorization());
List<LogAction> logs = session.executeAndCommitAction(action);
List<SLogAction> convertToSListLogAction = getBimServer().getSConverter().convertToSListLogAction(logs);
Collections.sort(convertToSListLogAction, new SLogComparator(true));
return convertToSListLogAction;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations