Class AuditServiceImpl
- java.lang.Object
-
- org.exoplatform.services.jcr.ext.audit.AuditServiceImpl
-
- All Implemented Interfaces:
AuditService,org.picocontainer.Startable
public class AuditServiceImpl extends Object implements AuditService, org.picocontainer.Startable
Created by The eXo Platform SAS .- Version:
- $Id: AuditServiceImpl.java 14416 2008-05-16 13:04:06Z pnedonosko $
- Author:
- Gennady Azarenkov
-
-
Field Summary
-
Fields inherited from interface org.exoplatform.services.jcr.ext.audit.AuditService
AUDIT_STORAGE_ID, EXO_AUDIT, EXO_AUDITABLE, EXO_AUDITHISTORY, EXO_AUDITHISTORY_LASTRECORD, EXO_AUDITHISTORY_TARGETNODE, EXO_AUDITRECORD, EXO_AUDITRECORD_AUDITVERSION, EXO_AUDITRECORD_AUDITVERSIONNAME, EXO_AUDITRECORD_CREATED, EXO_AUDITRECORD_EVENTTYPE, EXO_AUDITRECORD_NEWVALUE, EXO_AUDITRECORD_OLDVALUE, EXO_AUDITRECORD_PROPERTYNAME, EXO_AUDITRECORD_USER, EXO_AUDITSTORAGE
-
-
Constructor Summary
Constructors Constructor Description AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repService)AuditServiceImpl constructor.AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repService, org.exoplatform.services.jcr.ext.registry.RegistryService registryService)AuditServiceImpl constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRecord(javax.jcr.Item previousItem, javax.jcr.Item currentItem, int eventType)Adds new audit record.voidcreateHistory(javax.jcr.Node node)Creates audit history for given node.AuditHistorygetHistory(javax.jcr.Node node)Get node audit history.booleanhasHistory(javax.jcr.Node node)Check if node has audit history.voidremoveHistory(javax.jcr.Node node)Deletes audit history.voidstart()voidstop()
-
-
-
Constructor Detail
-
AuditServiceImpl
public AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repService) throws org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionAuditServiceImpl constructor.- Parameters:
initParams-repService-- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
-
AuditServiceImpl
public AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.RepositoryService repService, org.exoplatform.services.jcr.ext.registry.RegistryService registryService) throws org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionAuditServiceImpl constructor.- Parameters:
initParams-repService-registryService-- Throws:
org.exoplatform.services.jcr.config.RepositoryConfigurationException
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceorg.picocontainer.Startable
-
addRecord
public void addRecord(javax.jcr.Item previousItem, javax.jcr.Item currentItem, int eventType) throws javax.jcr.RepositoryExceptionDescription copied from interface:AuditServiceAdds new audit record.- Specified by:
addRecordin interfaceAuditService- Throws:
javax.jcr.RepositoryException
-
createHistory
public void createHistory(javax.jcr.Node node) throws javax.jcr.RepositoryExceptionDescription copied from interface:AuditServiceCreates audit history for given node. Throws an exception, if history already present.- Specified by:
createHistoryin interfaceAuditService- Throws:
javax.jcr.RepositoryException
-
getHistory
public AuditHistory getHistory(javax.jcr.Node node) throws javax.jcr.RepositoryException, UnsupportedOperationException
Description copied from interface:AuditServiceGet node audit history.- Specified by:
getHistoryin interfaceAuditService- Returns:
- audit history of this item
- Throws:
javax.jcr.RepositoryExceptionUnsupportedOperationException- if item(parent) is not auditable
-
hasHistory
public boolean hasHistory(javax.jcr.Node node)
Description copied from interface:AuditServiceCheck if node has audit history.- Specified by:
hasHistoryin interfaceAuditService- Returns:
- true if audit history for this item exists
-
removeHistory
public void removeHistory(javax.jcr.Node node) throws javax.jcr.RepositoryExceptionDescription copied from interface:AuditServiceDeletes audit history.- Specified by:
removeHistoryin interfaceAuditService- Throws:
javax.jcr.RepositoryException
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable
-
-