Audit changes and fixes

- Removed notion of audit session
 - Removed 'scope' attribute for DataGenerator elements
 - Removed alf_audit_session table and replaced with alf_audit_app (see script)
 - DataGenerators are working properly


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16053 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-09-02 14:45:23 +00:00
parent 381d7730c5
commit 2cdc1777f9
30 changed files with 448 additions and 515 deletions

View File

@@ -24,7 +24,9 @@
*/
package org.alfresco.service.cmr.audit;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.alfresco.service.NotAuditable;
import org.alfresco.service.PublicService;
@@ -100,4 +102,62 @@ public interface AuditService
*/
@NotAuditable
public List<AuditInfo> getAuditTrail(NodeRef nodeRef);
/*
* V3.2 from here on. Put all fixes to the older audit code before this point, please.
*/
/**
* The interface that will be used to give query results to the calling code.
* @since 3.2
*/
public static interface AuditQueryCallback
{
/**
* Check if summary or full data fetching is required. Depending on the return value,
* the underlying query may be completely different; it is not possible to change the
* return value and expect the callback to be used differently during row handling.
*
* @return Return <tt>true</tt> if summary data is required only i.e
* the full map of audit values for the entries will not be
* retrieved.
*/
boolean isSummaryOnly();
/**
* Handle a summary row of audit entry data. The ID of the full values map is provided.
*
* @param applicationName the name of the application
* @param user the user that logged the entry
* @param time the time of the entry
* @param valuesId the ID of the values map as created
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
*/
boolean handleAuditEntrySummary(String applicationName, String user, long time, Long valuesId);
/**
* Handle a full row of audit entry data.
*
* @param applicationName the name of the application
* @param user the user that logged the entry
* @param time the time of the entry
* @param values the values map as created
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
*/
boolean handleAuditEntryFull(String applicationName, String user, long time, Map<String, Serializable> values);
}
/**
* Get the audit entries that match the given criteria.
*
* @param callback the callback that will handle results
* @param auditPath if not <tt>null</tt>, at least one value in the entry must start with this path
* @param user if not <tt>null</tt>, the entry must be logged against this user
* @param from the start search time (use 0L) to cover all times
* @param to the end search time (use Long.MAX_VALUE) to cover all times
* @param limit the maximum number of results to retrieve
*/
void auditQuery(
AuditQueryCallback callback,
String auditPath, String user, long from, long to, int limit);
}