mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
AuditComponent work for new auditing
- Pulled old AuditDAO methods into new AuditDAO interface - Combined AuditDAO implementations - First cut of high-level AuditSession creation - TODO: AuditSession data generation according to path git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15864 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,15 +27,20 @@ package org.alfresco.repo.domain.audit;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
import java.util.zip.CRC32;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.audit.AuditState;
|
||||
import org.alfresco.repo.audit.hibernate.HibernateAuditDAO;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.domain.contentdata.ContentDataDAO;
|
||||
import org.alfresco.repo.domain.propval.PropertyValueDAO;
|
||||
import org.alfresco.service.cmr.audit.AuditInfo;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -50,10 +55,16 @@ public abstract class AbstractAuditDAOImpl implements AuditDAO
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(AbstractAuditDAOImpl.class);
|
||||
|
||||
private HibernateAuditDAO oldDAO;
|
||||
private ContentService contentService;
|
||||
private ContentDataDAO contentDataDAO;
|
||||
private PropertyValueDAO propertyValueDAO;
|
||||
|
||||
public void setOldDAO(HibernateAuditDAO oldDAO)
|
||||
{
|
||||
this.oldDAO = oldDAO;
|
||||
}
|
||||
|
||||
public void setContentService(ContentService contentService)
|
||||
{
|
||||
this.contentService = contentService;
|
||||
@@ -68,8 +79,29 @@ public abstract class AbstractAuditDAOImpl implements AuditDAO
|
||||
{
|
||||
this.propertyValueDAO = propertyValueDAO;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Support for older audit DAO
|
||||
*/
|
||||
|
||||
/**
|
||||
* Uses {@link HibernateAuditDAO older DAO}
|
||||
* @since 3.2
|
||||
*/
|
||||
public void audit(AuditState auditInfo)
|
||||
{
|
||||
oldDAO.audit(auditInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses {@link HibernateAuditDAO older DAO}
|
||||
* @since 3.2
|
||||
*/
|
||||
public List<AuditInfo> getAuditTrail(NodeRef nodeRef)
|
||||
{
|
||||
return oldDAO.getAuditTrail(nodeRef);
|
||||
}
|
||||
|
||||
/*
|
||||
* alf_audit_model
|
||||
*/
|
||||
|
Reference in New Issue
Block a user