org.exoplatform.services.jcr.ext.audit
Class AuditServiceImpl

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.audit.AuditServiceImpl
All Implemented Interfaces:
AuditService, org.picocontainer.Startable

public class AuditServiceImpl
extends java.lang.Object
implements AuditService, org.picocontainer.Startable

Created by The eXo Platform SAS .

Version:
$Id: AuditServiceImpl.java 35186 2009-08-07 14:23:43Z 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_PROPERTYNAME, EXO_AUDITRECORD_USER, EXO_AUDITSTORAGE
 
Constructor Summary
AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, RepositoryService repService)
          AuditServiceImpl constructor.
AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams, RepositoryService repService, RegistryService registryService)
          AuditServiceImpl constructor.
 
Method Summary
 void addRecord(javax.jcr.Item item, int eventType)
          Adds new audit record.
 void createHistory(javax.jcr.Node node)
          Ccreates audit history.
 AuditHistory getHistory(javax.jcr.Node node)
          Get node audit history.
 boolean hasHistory(javax.jcr.Node node)
          Check if node has audit history.
 void removeHistory(javax.jcr.Node node)
          Deletes audit history.
 void start()
          
 void stop()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditServiceImpl

public AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams,
                        RepositoryService repService)
                 throws RepositoryConfigurationException
AuditServiceImpl constructor.

Parameters:
initParams -
repService -
Throws:
RepositoryConfigurationException

AuditServiceImpl

public AuditServiceImpl(org.exoplatform.container.xml.InitParams initParams,
                        RepositoryService repService,
                        RegistryService registryService)
                 throws RepositoryConfigurationException
AuditServiceImpl constructor.

Parameters:
initParams -
repService -
registryService -
Throws:
RepositoryConfigurationException
Method Detail

start

public void start()

Specified by:
start in interface org.picocontainer.Startable

addRecord

public void addRecord(javax.jcr.Item item,
                      int eventType)
               throws javax.jcr.RepositoryException
Description copied from interface: AuditService
Adds new audit record.

Specified by:
addRecord in interface AuditService
Throws:
javax.jcr.RepositoryException

createHistory

public void createHistory(javax.jcr.Node node)
                   throws javax.jcr.RepositoryException
Description copied from interface: AuditService
Ccreates audit history.

Specified by:
createHistory in interface AuditService
Throws:
javax.jcr.RepositoryException

getHistory

public AuditHistory getHistory(javax.jcr.Node node)
                        throws javax.jcr.RepositoryException,
                               java.lang.UnsupportedOperationException
Description copied from interface: AuditService
Get node audit history.

Specified by:
getHistory in interface AuditService
Returns:
audit history of this item
Throws:
javax.jcr.RepositoryException
java.lang.UnsupportedOperationException - if item(parent) is not auditable

hasHistory

public boolean hasHistory(javax.jcr.Node node)
Description copied from interface: AuditService
Check if node has audit history.

Specified by:
hasHistory in interface AuditService
Returns:
true if audit history for this item exists

removeHistory

public void removeHistory(javax.jcr.Node node)
                   throws javax.jcr.RepositoryException
Description copied from interface: AuditService
Deletes audit history.

Specified by:
removeHistory in interface AuditService
Throws:
javax.jcr.RepositoryException

stop

public void stop()

Specified by:
stop in interface org.picocontainer.Startable


Copyright © 2010 eXo Platform SAS. All Rights Reserved.