com.atlassian.bamboo.persister
Interface AuditLogService

All Known Implementing Classes:
DefaultAuditLogService

public interface AuditLogService

Service allowing you to register audit messages against the system or against plans. Audit messages allow you to track changes to configuration.


Nested Class Summary
static interface AuditLogService.FieldChange
          Simple interface that provides information about a changed field.
 
Method Summary
 java.util.List<AuditLogEntry> getAuditLogMessagesForPlan(Plan plan)
          Provide a list of all audit log messages written against a plan.
 java.util.List<AuditLogEntry> getAuditLogMessagesForPlan(Plan plan, long startDate, long endDate)
          Provide a list of all audit log messages written against a plan between input dates.
 java.util.List<AuditLogEntry> getGlobalAuditLogMessages()
          Provide a list of all audit log messages written against the system.
 boolean isEnabled()
          Returns whether loggings is enabled
 void log(AuditLogEntry msg)
          Add a log to the audit log.
 void log(java.util.Collection<AuditLogService.FieldChange> changes, PlanKey plan)
          Add 'field change' messages to the system audit log.
 void log(java.lang.String msg)
          Add a message to the system audit log.
 void log(java.lang.String msg, PlanKey plan)
          Add a message to the plans audit log.
 void log(java.lang.String fieldName, java.lang.String oldValue, java.lang.String newValue, PlanKey plan)
          Add 'field change' message to the system audit log.
 void log(com.atlassian.user.User user, java.lang.String msg)
          Add a message to the system audit log.
 void log(com.atlassian.user.User user, java.lang.String msg, PlanKey plan)
          Add a message to the plans audit log.
 void removeAllAuditLogMessages()
          Deletes all log messages in the database
 void removeAuditLogMessagesForPlan(Plan 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
 

Method Detail

log

void log(@NotNull
         AuditLogEntry msg)
Add a log to the audit log.

Parameters:
msg - (fully populated) to be logged

log

void log(@NotNull
         java.lang.String msg)
Add a message to the system audit log. Message will be logged against the user that is currently set in the authentication context.

Parameters:
msg - the text of the message to add.

log

void log(@NotNull
         java.util.Collection<AuditLogService.FieldChange> changes,
         @Nullable
         PlanKey plan)
Add 'field change' messages to the system audit log. The messages will be logged against the user that is currently set in the authentication context. If plan key is not null the message will be logged against the given plan.

Parameters:
changes -
plan -

log

void log(@NotNull
         java.lang.String fieldName,
         @Nullable
         java.lang.String oldValue,
         @Nullable
         java.lang.String newValue,
         @Nullable
         PlanKey plan)
Add 'field change' message to the system audit log. The messages will be logged against the user that is currently set in the authentication context. If plan key is not null the message will be logged against the given plan.

Parameters:
fieldName -
oldValue -
newValue -
plan -

log

void log(@Nullable
         com.atlassian.user.User user,
         @NotNull
         java.lang.String msg)
Add a message to the system audit log. Message will be logged against the current logged in user (if available)

Parameters:
user - who caused the event being logged
msg - the text of the message to add.

log

void log(@NotNull
         java.lang.String msg,
         @Nullable
         PlanKey plan)
Add a message to the plans audit log. Message will be logged against the current logged in user (if available)

Parameters:
msg - to log
plan - to log it against

log

void log(@Nullable
         com.atlassian.user.User user,
         @NotNull
         java.lang.String msg,
         @Nullable
         PlanKey plan)
Add a message to the plans audit log. Message will be logged against provided user

Parameters:
user - who caused the event being logged
msg - to be logged
plan - to log the message against.

getAuditLogMessagesForPlan

java.util.List<AuditLogEntry> getAuditLogMessagesForPlan(@NotNull
                                                         Plan plan)
Provide a list of all audit log messages written against a plan.

Parameters:
plan - to find audit messages for
Returns:
List of audit log entries for the given plan

getAuditLogMessagesForPlan

java.util.List<AuditLogEntry> getAuditLogMessagesForPlan(@NotNull
                                                         Plan plan,
                                                         long startDate,
                                                         long endDate)
Provide a list of all audit log messages written against a plan between input dates.

Parameters:
plan - to find audit messages for
startDate -
endDate -
Returns:
List of audit log entries for the given plan

getGlobalAuditLogMessages

java.util.List<AuditLogEntry> getGlobalAuditLogMessages()
Provide a list of all audit log messages written against the system.

Returns:
a list of audit log entries for the system

removeGlobalAuditLogMessages

void removeGlobalAuditLogMessages()
Deletes all Global Audit Log messages


removeAuditLogMessagesForPlan

void removeAuditLogMessagesForPlan(@NotNull
                                   Plan plan)
Deletes all log messages for a given plan

Parameters:
plan - to delete messages for

removeAllAuditLogMessages

void removeAllAuditLogMessages()
Deletes all log messages in the database


isEnabled

boolean isEnabled()
Returns whether loggings is enabled

Returns:

setEnabled

void setEnabled(boolean enabled)
sets whether logging is enabled or not

Parameters:
enabled -


Copyright © 2011 Atlassian. All Rights Reserved.