public interface AuditLogService
Modifier and Type | Interface and Description |
---|---|
static interface |
AuditLogService.FieldChange
Simple interface that provides information about a changed field.
|
Modifier and Type | Method and Description |
---|---|
long |
countAuditLogMessagesForEntity(@NotNull String entityId,
@Nullable AuditLogEntityType entityType,
long startDate,
long endDate) |
long |
countAuditLogMessagesForPlan(@NotNull ImmutablePlan plan)
Count audit log messages for plan
|
long |
countAuditLogMessagesForPlan(@NotNull ImmutablePlan plan,
long startDate,
long endDate)
Count audit log messages for plan in a given time period
|
long |
countGlobalAuditLogMessages()
Count global audit log messages.
|
List<AuditLogEntry> |
getAgentAuditLogsMessagesByAgentName(String agentName)
Provide a list of audit log messages filter by Agent Name
|
List<AuditLogEntry> |
getAuditLogMessagesForEntity(@NotNull String entityId,
@Nullable AuditLogEntityType entityType,
long startDate,
long endDate,
int firstResult,
int maxResults) |
List<AuditLogEntry> |
getAuditLogMessagesForPlan(@NotNull ImmutablePlan plan,
long startDate,
long endDate,
int firstResult,
int maxResults)
Provide a paginated list of all audit log messages written against a plan between input dates.
|
List<AuditLogEntry> |
getGlobalAuditLogMessages()
Deprecated.
since 7.0 use paginated version instead
getGlobalAuditLogMessages(int, int) |
List<AuditLogEntry> |
getGlobalAuditLogMessages(int firstResult,
int maxResults)
Provide a page of a list of all audit log messages written against the system.
|
boolean |
hasAuditLogMessagesForPlan(@NotNull ImmutablePlan plan,
long startDate,
long endDate)
Determine whether any log messages have been recorded against the specified plan between the
startDate and endDate (inclusive).
|
boolean |
isEnabled()
Returns whether logging is enabled
|
boolean |
isRssUpdatedLog() |
void |
log(@NotNull AuditLogEntry msg)
Add a log to the audit log.
|
void |
log(@NotNull Collection<AuditLogService.FieldChange> changes,
@Nullable Key key)
Add 'field change' messages to the system audit log.
|
void |
log(@NotNull Iterable<AuditLogService.FieldChange> changes,
@Nullable AuditLogEntity entity)
Add 'field change' messages to the system audit log.
|
void |
log(@NotNull Iterable<AuditLogService.FieldChange> changes,
@Nullable String entityId,
AuditLogEntityType entityType,
@Nullable String childKey,
@Nullable AuditLogEntity entity) |
void |
log(@NotNull String msg)
Add a message to the system audit log.
|
default void |
log(@NotNull String msg,
@Nullable Key plan)
Deprecated.
since 6.7
|
default void |
log(@NotNull String s,
@Nullable Key planKey,
@Nullable AuditLogEntity entity)
Deprecated.
since 6.7
|
void |
log(@NotNull String msg,
@Nullable Key key,
AuditLogEntityType entityType)
Add a message to the plans audit log.
|
void |
log(@NotNull String s,
@Nullable Key key,
@Nullable AuditLogEntityType entityType,
@Nullable AuditLogEntity entity)
Add a message to the entity's audit log.
|
void |
log(@NotNull String fieldName,
@Nullable String oldValue,
@Nullable String newValue,
@Nullable Key plan)
Add 'field change' message to the system audit log.
|
default void |
log(@NotNull String fieldName,
@Nullable String oldValue,
@Nullable String newValue,
@Nullable Key planKey,
@Nullable AuditLogEntity entity)
Deprecated.
since 6.7
|
void |
log(@NotNull String fieldName,
@Nullable String oldValue,
@Nullable String newValue,
@Nullable Key key,
AuditLogEntityType entityType,
@Nullable AuditLogEntity entity)
Add 'field change' message to the system audit log.
|
void |
log(@Nullable com.atlassian.user.User user,
@NotNull String msg)
Add a message to the system audit log.
|
default void |
log(@Nullable com.atlassian.user.User user,
@NotNull String msg,
@Nullable Key plan)
Deprecated.
since 6.7
|
default void |
log(@Nullable com.atlassian.user.User user,
@NotNull String msg,
@Nullable Key planKey,
@Nullable AuditLogEntity entity)
Deprecated.
since 6.7
|
void |
log(@Nullable com.atlassian.user.User user,
@NotNull String msg,
@Nullable Key key,
@Nullable AuditLogEntityType entityType)
Add a message to the entity's audit log.
|
void |
log(@Nullable com.atlassian.user.User user,
@NotNull String msg,
@Nullable Key key,
@Nullable AuditLogEntityType entityType,
@Nullable AuditLogEntity entity)
Add a message to the plans audit log.
|
void |
removeAllAuditLogMessages()
Deletes all log messages in the database
|
void |
removeAuditLogMessagesByTypeAndEntityId(@NotNull String entityId,
@Nullable AuditLogEntityType entityType) |
void |
removeAuditLogMessagesForPlan(@NotNull ImmutablePlan plan)
Deletes all log messages for a given plan
|
void |
removeGlobalAuditLogMessages()
Deletes all Global audit log messages
|
void |
setEnabled(boolean enabled)
sets whether logging is enabled or not
|
void |
setRssUpdatedLog(Boolean isRss)
sets whether logging is for RSS update.
|
void log(@NotNull @NotNull AuditLogEntry msg)
msg
- (fully populated) to be loggedvoid log(@NotNull @NotNull String msg)
msg
- the text of the message to add.void log(@NotNull @NotNull Collection<AuditLogService.FieldChange> changes, @Nullable @Nullable Key key)
void log(@NotNull @NotNull Iterable<AuditLogService.FieldChange> changes, @Nullable @Nullable String entityId, AuditLogEntityType entityType, @Nullable @Nullable String childKey, @Nullable @Nullable AuditLogEntity entity)
void log(@NotNull @NotNull Iterable<AuditLogService.FieldChange> changes, @Nullable @Nullable AuditLogEntity entity)
void log(@NotNull @NotNull String fieldName, @Nullable @Nullable String oldValue, @Nullable @Nullable String newValue, @Nullable @Nullable Key plan)
@Deprecated default void log(@NotNull @NotNull String fieldName, @Nullable @Nullable String oldValue, @Nullable @Nullable String newValue, @Nullable @Nullable Key planKey, @Nullable @Nullable AuditLogEntity entity)
entity
- job's task or chain's stage affected by the changevoid log(@NotNull @NotNull String fieldName, @Nullable @Nullable String oldValue, @Nullable @Nullable String newValue, @Nullable @Nullable Key key, AuditLogEntityType entityType, @Nullable @Nullable AuditLogEntity entity)
entity
- job's task or chain's stage affected by the changevoid log(@Nullable @Nullable com.atlassian.user.User user, @NotNull @NotNull String msg)
user
- who caused the event being loggedmsg
- the text of the message to add.@Deprecated default void log(@NotNull @NotNull String msg, @Nullable @Nullable Key plan)
msg
- to logplan
- to log it againstvoid log(@NotNull @NotNull String msg, @Nullable @Nullable Key key, AuditLogEntityType entityType)
msg
- to logkey
- to log it against@Deprecated default void log(@NotNull @NotNull String s, @Nullable @Nullable Key planKey, @Nullable @Nullable AuditLogEntity entity)
s
- to logplanKey
- to log it againstentity
- job's task, chain' stage etc. to log againstvoid log(@NotNull @NotNull String s, @Nullable @Nullable Key key, @Nullable @Nullable AuditLogEntityType entityType, @Nullable @Nullable AuditLogEntity entity)
s
- to logkey
- to log it againstentity
- job's task, chain' stage etc. to log against@Deprecated default void log(@Nullable @Nullable com.atlassian.user.User user, @NotNull @NotNull String msg, @Nullable @Nullable Key plan)
user
- who caused the event being loggedmsg
- to be loggedplan
- to log the message against.void log(@Nullable @Nullable com.atlassian.user.User user, @NotNull @NotNull String msg, @Nullable @Nullable Key key, @Nullable @Nullable AuditLogEntityType entityType)
user
- who caused the event being loggedmsg
- to be loggedkey
- to log the message against.@Deprecated default void log(@Nullable @Nullable com.atlassian.user.User user, @NotNull @NotNull String msg, @Nullable @Nullable Key planKey, @Nullable @Nullable AuditLogEntity entity)
user
- who caused the event being loggedmsg
- to be loggedplanKey
- to log the message against.entity
- header of job's task, chain' stage etc. to log againstvoid log(@Nullable @Nullable com.atlassian.user.User user, @NotNull @NotNull String msg, @Nullable @Nullable Key key, @Nullable @Nullable AuditLogEntityType entityType, @Nullable @Nullable AuditLogEntity entity)
user
- who caused the event being loggedmsg
- to be loggedkey
- to log the message against.entity
- header of job's task, chain' stage etc. to log againstList<AuditLogEntry> getAuditLogMessagesForPlan(@NotNull @NotNull ImmutablePlan plan, long startDate, long endDate, int firstResult, int maxResults)
plan
- to find audit messages forstartDate
- 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 endList<AuditLogEntry> getAgentAuditLogsMessagesByAgentName(String agentName)
agentName
- the name of the agent@Deprecated List<AuditLogEntry> getGlobalAuditLogMessages()
getGlobalAuditLogMessages(int, int)
List<AuditLogEntry> getGlobalAuditLogMessages(int firstResult, int maxResults)
long countGlobalAuditLogMessages()
long countAuditLogMessagesForPlan(@NotNull @NotNull ImmutablePlan plan)
long countAuditLogMessagesForPlan(@NotNull @NotNull ImmutablePlan plan, long startDate, long endDate)
long countAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate)
void removeGlobalAuditLogMessages()
boolean hasAuditLogMessagesForPlan(@NotNull @NotNull ImmutablePlan plan, long startDate, long endDate)
getAuditLogMessagesForPlan(ImmutablePlan, long, long, int, int)
.startDate
- 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.void removeAuditLogMessagesForPlan(@NotNull @NotNull ImmutablePlan plan)
plan
- to delete messages forvoid removeAuditLogMessagesByTypeAndEntityId(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType)
void removeAllAuditLogMessages()
boolean isEnabled()
void setEnabled(boolean enabled)
List<AuditLogEntry> getAuditLogMessagesForEntity(@NotNull @NotNull String entityId, @Nullable @Nullable AuditLogEntityType entityType, long startDate, long endDate, int firstResult, int maxResults)
boolean isRssUpdatedLog()
void setRssUpdatedLog(Boolean isRss)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.