use of com.sequenceiq.cloudbreak.comparator.audit.AuditEventComparator in project cloudbreak by hortonworks.
the class AuditEventService method getAuditEventsByWorkspaceId.
public List<AuditEventV4Response> getAuditEventsByWorkspaceId(Long workspaceId, String resourceType, Long resourceId, String resourceCrn) {
User user = userService.getOrCreate(legacyRestRequestThreadLocalService.getCloudbreakUser());
Workspace workspace = getWorkspaceService().get(workspaceId, user);
List<AuditEventV4Response> auditEventV4Responses = getEventsForUserWithTypeAndResourceIdByWorkspace(workspace, resourceType, resourceId, resourceCrn);
auditEventV4Responses.sort(new AuditEventComparator().reversed());
return auditEventV4Responses;
}
Aggregations