org.alfresco.repo.domain.audit
Interface AuditDAO

All Known Implementing Classes:
AbstractAuditDAOImpl, AuditDAOImpl

public interface AuditDAO

DAO services for alf_audit_XXX tables.

The older methods are supported by a different implementation and will eventually be deprecated and phased out.

Since:
3.2

Nested Class Summary
static class AuditDAO.AuditApplicationInfo
          Information about the audit application to be passed in an out of the interface.
 
Method Summary
 AuditDAO.AuditApplicationInfo createAuditApplication(java.lang.String application, java.lang.Long modelId)
          Creates a new audit application.
 java.lang.Long createAuditEntry(java.lang.Long applicationId, long time, java.lang.String username, java.util.Map values)
          Create a new audit entry with the given map of values.
 int deleteAuditEntries(java.util.List auditEntryIds)
          Delete a discrete list of audit entries.
 int deleteAuditEntries(java.lang.Long applicationId, java.lang.Long from, java.lang.Long to)
          Delete audit entries for the application, possibly limiting the time range.
 void findAuditEntries(AuditService.AuditQueryCallback callback, AuditQueryParameters parameters, int maxResults)
          Find audit entries using the given parameters, any of which may be null
 AuditDAO.AuditApplicationInfo getAuditApplication(java.lang.String applicationName)
          Get the audit application details.
 org.alfresco.util.Pair getOrCreateAuditModel(java.net.URL url)
          Creates a new audit model entry or finds an existing one
 void updateAuditApplicationDisabledPaths(java.lang.Long id, java.util.Set disabledPaths)
          Update the audit application to hold a new set of disabled paths.
 void updateAuditApplicationModel(java.lang.Long id, java.lang.Long modelId)
          Update the audit application to refer to a new model.
 

Method Detail

getOrCreateAuditModel

org.alfresco.util.Pair getOrCreateAuditModel(java.net.URL url)
Creates a new audit model entry or finds an existing one

Parameters:
the - URL of the configuration
Returns:
Returns the ID of the config matching the input stream and the content storage details
Since:
3.2

getAuditApplication

AuditDAO.AuditApplicationInfo getAuditApplication(java.lang.String applicationName)
Get the audit application details.

Parameters:
applicationName - the name of the application
Returns:
Returns details of an existing application or null if it doesn't exist
Since:
3.2

createAuditApplication

AuditDAO.AuditApplicationInfo createAuditApplication(java.lang.String application,
                                                     java.lang.Long modelId)
Creates a new audit application. The application name must be unique.

Parameters:
application - the name of the application
modelId - the ID of the model configuration
Since:
3.2

updateAuditApplicationModel

void updateAuditApplicationModel(java.lang.Long id,
                                 java.lang.Long modelId)
Update the audit application to refer to a new model. If the model did not change, then nothing will be done.

Parameters:
id - the ID of the audit application
modelId - the ID of the new model
Since:
3.2

updateAuditApplicationDisabledPaths

void updateAuditApplicationDisabledPaths(java.lang.Long id,
                                         java.util.Set disabledPaths)
Update the audit application to hold a new set of disabled paths. If the value did not change, then nothing will be done.

Parameters:
id - the ID of the audit application
disabledPaths - the new disabled paths
Since:
3.2

deleteAuditEntries

int deleteAuditEntries(java.lang.Long applicationId,
                       java.lang.Long from,
                       java.lang.Long to)
Delete audit entries for the application, possibly limiting the time range.

Parameters:
applicationId - and existing audit application ID
from - the minimum entry time (inclusive, optional)
to - the maximum entry time (exclusive, optional)
Returns:
Returns the number of entries deleted
Since:
3.2

deleteAuditEntries

int deleteAuditEntries(java.util.List auditEntryIds)
Delete a discrete list of audit entries. Duplicate entries are collapsed and the number of entries deleted will match the count of unique IDs in the list; otherwise a concurrency condition has occured and an exception will be generated.

Parameters:
auditEntryIds - the IDs of all audit entries to delete
Returns:
Returns the number of entries deleted

createAuditEntry

java.lang.Long createAuditEntry(java.lang.Long applicationId,
                                long time,
                                java.lang.String username,
                                java.util.Map values)
Create a new audit entry with the given map of values.

Parameters:
applicationId - an existing audit application ID
time - the time (ms since epoch) to log the entry against
username - the authenticated user (null if not present)
values - the values to record
Returns:
Returns the unique entry ID
Since:
3.2

findAuditEntries

void findAuditEntries(AuditService.AuditQueryCallback callback,
                      AuditQueryParameters parameters,
                      int maxResults)
Find audit entries using the given parameters, any of which may be null

Parameters:
callback - the data callback per entry
parameters - the parameters for the query (may not be null)
maxResults - the maximum number of results to retrieve


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.