com.atlassian.bamboo.persister
Class DefaultAuditLogService

java.lang.Object
  extended by com.atlassian.bamboo.persister.DefaultAuditLogService
All Implemented Interfaces:
AuditLogService

public class DefaultAuditLogService
extends java.lang.Object
implements AuditLogService


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.bamboo.persister.AuditLogService
AuditLogService.FieldChange
 
Constructor Summary
DefaultAuditLogService(AuditLogDao auditLogDao, BambooAuthenticationContext authenticationContext)
           
 
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> getGlobalAuditLogMessages()
          Provide a list of all audit log messages written against the system.
 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 planKey)
          Add a message to the plans audit log.
 void log(java.lang.String username, java.lang.String msg, PlanKey planKey)
           
 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 planKey)
          Add a message to the plans audit log.
 void removeAuditLogMessagesForPlan(Plan plan)
          Deletes all log messages for a given plan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuditLogService

public DefaultAuditLogService(AuditLogDao auditLogDao,
                              BambooAuthenticationContext authenticationContext)
Method Detail

log

public void log(@NotNull
                AuditLogEntry msg)
Description copied from interface: AuditLogService
Add a log to the audit log.

Specified by:
log in interface AuditLogService
Parameters:
msg - (fully populated) to be logged

log

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

Specified by:
log in interface AuditLogService
Parameters:
msg - the text of the message to add.

log

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

Specified by:
log in interface AuditLogService
Parameters:
user - who caused the event being logged
msg - the text of the message to add.

log

public void log(@NotNull
                java.lang.String msg,
                @Nullable
                PlanKey planKey)
Description copied from interface: AuditLogService
Add a message to the plans audit log. Message will be logged against the current logged in user (if available)

Specified by:
log in interface AuditLogService
Parameters:
msg - to log
planKey - to log it against

log

public void log(@Nullable
                com.atlassian.user.User user,
                @NotNull
                java.lang.String msg,
                @Nullable
                PlanKey planKey)
Description copied from interface: AuditLogService
Add a message to the plans audit log. Message will be logged against provided user

Specified by:
log in interface AuditLogService
Parameters:
user - who caused the event being logged
msg - to be logged
planKey - to log the message against.

log

public void log(@Nullable
                java.lang.String username,
                @NotNull
                java.lang.String msg,
                @Nullable
                PlanKey planKey)

getAuditLogMessagesForPlan

public java.util.List<AuditLogEntry> getAuditLogMessagesForPlan(Plan plan)
Description copied from interface: AuditLogService
Provide a list of all audit log messages written against a plan.

Specified by:
getAuditLogMessagesForPlan in interface AuditLogService
Parameters:
plan - to find audit messages for
Returns:
List of audit log entries for the given plan

removeAuditLogMessagesForPlan

public void removeAuditLogMessagesForPlan(@NotNull
                                          Plan plan)
Description copied from interface: AuditLogService
Deletes all log messages for a given plan

Specified by:
removeAuditLogMessagesForPlan in interface AuditLogService
Parameters:
plan - to delete messages for

getGlobalAuditLogMessages

public java.util.List<AuditLogEntry> getGlobalAuditLogMessages()
Description copied from interface: AuditLogService
Provide a list of all audit log messages written against the system.

Specified by:
getGlobalAuditLogMessages in interface AuditLogService
Returns:
a list of audit log entries for the system

log

public void log(@NotNull
                java.util.Collection<AuditLogService.FieldChange> changes,
                @Nullable
                PlanKey plan)
Description copied from interface: AuditLogService
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.

Specified by:
log in interface AuditLogService


Copyright © 2010 Atlassian. All Rights Reserved.