public class AuditQuery extends Object
AuditEntity
. Following fields can be used in query -
Modifier and Type | Class and Description |
---|---|
static class |
AuditQuery.AuditResourceIdentifier |
static class |
AuditQuery.Builder |
Modifier and Type | Method and Description |
---|---|
static AuditQuery.Builder |
builder() |
static AuditQuery.Builder |
builder(AuditQuery query) |
boolean |
equals(Object o) |
Set<String> |
getActions() |
Set<String> |
getCategories() |
Optional<Instant> |
getFrom() |
Optional<Long> |
getMaxId() |
Optional<Long> |
getMinId() |
Optional<String> |
getResourceId()
Deprecated.
since release 1.5.0, replaced by
getResources() |
Set<AuditQuery.AuditResourceIdentifier> |
getResources()
The DB query will be conducted as:
AND between different resource types
OR with the same resource type
For example, given
Project P1
Repository R11
Repository R12
Project P2
Repository R21
Repository R22
then
the resource filter [Project:P1] returns events belong to [R11, R12]
the resource filter [Project:P1,Repository:R11] returns events belong to [R11]
the resource filter [Project:P1,Repository:R11,Repository:R12] returns events belong to [R11,R12]
the resource filter [Project:P1,Project:P2,Repository:R11,Repository:R12] returns events belong to [R11,R12]
the resource filter [Project:P1,Project:P2,Repository:R11,Repository:R12, Repository:R21] returns events belong to [R11,R12,R21]
the resource filter [Project:P1,Repository:R21,Repository:R22] returns no result
|
Optional<String> |
getResourceType()
Deprecated.
since release 1.5.0, replaced by
getResources() |
Optional<String> |
getSearchText() |
Optional<Instant> |
getTo() |
Set<String> |
getUserIds() |
boolean |
hasFilter() |
int |
hashCode() |
@Nonnull public Set<String> getActions()
AuditEntity
to be queried. Empty list means this filter is
not applied.@Nonnull public Set<String> getCategories()
AuditEntity
to be queried. Empty list means this filter is
not applied.@Nonnull public Optional<Instant> getFrom()
AuditEntity
needs to be queried.@Nonnull public Optional<Instant> getTo()
AuditEntity
needs to be queried.@Deprecated @Nonnull public Optional<String> getResourceId()
getResources()
AuditResource
returned by getResources()
@Deprecated @Nonnull public Optional<String> getResourceType()
getResources()
AuditResource
returned by getResources()
@Nonnull public Set<AuditQuery.AuditResourceIdentifier> getResources()
AuditResource
's. At least one of them should be present in
AuditEntity.getAffectedObjects()
for that entity to be found.@Nonnull public Set<String> getUserIds()
AuditEntity.getAuthor()
to be queried. Empty list means this
filter is not applied.@Nonnull public Optional<String> getSearchText()
AuditEntity
@Nonnull public Optional<Long> getMinId()
@Nonnull public Optional<Long> getMaxId()
public static AuditQuery.Builder builder()
public static AuditQuery.Builder builder(AuditQuery query)
public boolean hasFilter()
Copyright © 2020 Atlassian. All rights reserved.