Package com.atlassian.bamboo.persister
Interface AuditLogDao
-
- All Superinterfaces:
BambooObjectDao<AuditLogEntry>
- All Known Implementing Classes:
AuditLogHibernateDao
public interface AuditLogDao extends BambooObjectDao<AuditLogEntry>
Data Access Object for translatingAuditLogEntry
objects to and from theAUDIT_LOG
table.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description long
countAuditLogMessagesForEntity(@NotNull String entityId, @Nullable AuditLogEntityType entityType, long startDate, long endDate)
Retrieve the number of audit log messages recorded against the specified entity between the startDate and endDate (inclusive).long
countAuditLogMessagesForEntity(@NotNull String entityId, @Nullable AuditLogEntityType entityType, long startDate, long endDate, @Nullable String searchTerm)
Retrieve the number of audit log messages recorded against the specified entity between the startDate and endDate (inclusive).long
countGlobalAuditLogMessages()
Count global audit log messages.long
countGlobalAuditLogMessages(@Nullable String searchTerm)
Count global audit log messages.void
deleteAllAuditLogMessages()
Delete all audit logsvoid
deleteAuditLogMessagesByTypeAndEntityId(String entityId, AuditLogEntityType entityType)
@NotNull Collection<? extends AuditLogEntry>
findAll()
List<AuditLogEntry>
getAgentAuditLogsMessagesByAgentName(String agentName)
Provide a list of audit log messages filter by Agent Name.List<AuditLogEntry>
getAgentAuditLogsMessagesByAgentName(String agentName, @Nullable String searchTerm)
Provide a list of audit log messages filter by Agent Name and the Search Term.List<AuditLogEntry>
getAuditLogMessagesForEntity(@NotNull String entityId, @Nullable AuditLogEntityType entityType, long startDate, long endDate, int firstResult, int maxResults)
List<AuditLogEntry>
getAuditLogMessagesForEntity(@NotNull String entityId, @Nullable AuditLogEntityType entityType, long startDate, long endDate, int firstResult, int maxResults, @Nullable String searchTerm)
Provide a paginated list of all audit log messages written against an entity between input dates and requested search term.List<AuditLogEntry>
getAuditLogMessagesForPlan(ImmutablePlan plan, long startDate, long endDate, int firstResult, int maxResults)
Deprecated.List<AuditLogEntry>
getGlobalAuditLogMessages()
Deprecated.since 7.0 usegetGlobalAuditLogMessages(int, int)
List<AuditLogEntry>
getGlobalAuditLogMessages(int firstResult, int maxResults)
Provide a page of a list of all audit log messages written against the system.List<AuditLogEntry>
getGlobalAuditLogMessages(int firstResult, int maxResults, @Nullable String searchTerm)
Provide a page of a list of all audit log messages written against the system filtered by delivered searchTerm.long
scrollAuditLogsForExport(Consumer<AuditLogEntry> consumer)
Scroll through all AuditLogEntry records and pass them to consumer-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
getAuditLogMessagesForPlan
@Deprecated List<AuditLogEntry> getAuditLogMessagesForPlan(ImmutablePlan plan, long startDate, long endDate, int firstResult, int maxResults)
Deprecated.
-
getAuditLogMessagesForEntity
List<AuditLogEntry> getAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate, int firstResult, int maxResults)
-
getAuditLogMessagesForEntity
@ExperimentalApi List<AuditLogEntry> getAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate, int firstResult, int maxResults, @Nullable @Nullable String searchTerm)
Provide a paginated list of all audit log messages written against an entity between input dates and requested search term.- Parameters:
entityId
- to find audit messages forentityType
- type of entity associated with the entityIdstartDate
- if specified, messages before this date will be excluded. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set a start range.endDate
- if specified, messages after this date will be excluded. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set an end range.firstResult
- if specified marks a first item to be returned, passing 0 or negative number will effect with returning elements from the beginningmaxResults
- if specified marks a total number of items to be returned, passing 0 or negative number will effect with returning all elements until the endsearchTerm
- value against which the results are filtered out- Returns:
- List of audit log entries for the given entity
- Since:
- 9.1
-
countAuditLogMessagesForEntity
long countAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate)
Retrieve the number of audit log messages recorded against the specified entity between the startDate and endDate (inclusive). This is equivalent to but usually faster than checking the size ofgetAuditLogMessagesForPlan(ImmutablePlan, long, long, int, int)
.- Parameters:
startDate
- only messages at or after this time will be retrieved. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set a start range.endDate
- only messages at or before this time will be retrieved. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set an end range.- Returns:
- the number of audit messages found. Always 0 or more.
-
countAuditLogMessagesForEntity
@ExperimentalApi long countAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate, @Nullable @Nullable String searchTerm)
Retrieve the number of audit log messages recorded against the specified entity between the startDate and endDate (inclusive). This is equivalent to but usually faster than checking the size ofgetAuditLogMessagesForPlan(ImmutablePlan, long, long, int, int)
.- Parameters:
startDate
- only messages at or after this time will be retrieved. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set a start range.endDate
- only messages at or before this time will be retrieved. Represented as milliseconds after January 1, 1970 00:00:00 GMT. Passing 0 or a negative number will not set an end range.searchTerm
- value against which the results are filtered out- Returns:
- the number of audit messages found. Always 0 or more.
- Since:
- 9.1
-
countGlobalAuditLogMessages
long countGlobalAuditLogMessages()
Count global audit log messages.- Returns:
- number of potential results
-
countGlobalAuditLogMessages
@ExperimentalApi long countGlobalAuditLogMessages(@Nullable @Nullable String searchTerm)
Count global audit log messages.- Parameters:
searchTerm
- the phrase against which the results will be counted- Returns:
- number of potential results
- Since:
- 9.1
-
getGlobalAuditLogMessages
List<AuditLogEntry> getGlobalAuditLogMessages(int firstResult, int maxResults)
Provide a page of a list of all audit log messages written against the system.- Returns:
- a list of audit log entries for the system
-
getGlobalAuditLogMessages
@ExperimentalApi List<AuditLogEntry> getGlobalAuditLogMessages(int firstResult, int maxResults, @Nullable @Nullable String searchTerm)
Provide a page of a list of all audit log messages written against the system filtered by delivered searchTerm.- Parameters:
firstResult
-maxResults
-searchTerm
- the phrase against which the search will be made- Returns:
- a list of audit log entries for the system
- Since:
- 9.1
-
getGlobalAuditLogMessages
@Deprecated List<AuditLogEntry> getGlobalAuditLogMessages()
Deprecated.since 7.0 usegetGlobalAuditLogMessages(int, int)
Provide a list of all audit log messages written against the system.- Returns:
- a list of audit log entries for the system
-
deleteAllAuditLogMessages
void deleteAllAuditLogMessages()
Delete all audit logs
-
deleteAuditLogMessagesByTypeAndEntityId
void deleteAuditLogMessagesByTypeAndEntityId(String entityId, AuditLogEntityType entityType)
-
findAll
@NotNull @NotNull Collection<? extends AuditLogEntry> findAll()
-
getAgentAuditLogsMessagesByAgentName
List<AuditLogEntry> getAgentAuditLogsMessagesByAgentName(String agentName)
Provide a list of audit log messages filter by Agent Name.- Parameters:
agentName
- the name of the agent- Returns:
- List of audit log entries for the given Agent Name.
-
getAgentAuditLogsMessagesByAgentName
@ExperimentalApi List<AuditLogEntry> getAgentAuditLogsMessagesByAgentName(String agentName, @Nullable @Nullable String searchTerm)
Provide a list of audit log messages filter by Agent Name and the Search Term.- Parameters:
agentName
- the name of the agentsearchTerm
- the value searched in the Agent related audit log- Returns:
- List of audit log entries for the given Agent Name and Search Term.
- Since:
- 9.1
-
scrollAuditLogsForExport
long scrollAuditLogsForExport(Consumer<AuditLogEntry> consumer)
Scroll through all AuditLogEntry records and pass them to consumer
-
-