info.magnolia.audit
Class MgnlAuditLoggingContentDecoratorSessionWrapper

java.lang.Object
  extended by info.magnolia.jcr.wrapper.DelegateSessionWrapper
      extended by info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper<MgnlAuditLoggingContentDecorator>
          extended by info.magnolia.audit.MgnlAuditLoggingContentDecoratorSessionWrapper
All Implemented Interfaces:
javax.jcr.Session

public class MgnlAuditLoggingContentDecoratorSessionWrapper
extends ContentDecoratorSessionWrapper<MgnlAuditLoggingContentDecorator>

A Session wrapper implementation which inform Magnolia audit logging content decorator MgnlAuditLoggingContentDecorator about action (Move, Delete) on the node. The implementation also take care about logging actions into audit-log output during save action.


Field Summary
 
Fields inherited from class info.magnolia.jcr.wrapper.DelegateSessionWrapper
wrapped
 
Fields inherited from interface javax.jcr.Session
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY
 
Constructor Summary
MgnlAuditLoggingContentDecoratorSessionWrapper(javax.jcr.Session session, MgnlAuditLoggingContentDecorator contentDecorator)
           
 
Method Summary
 void move(String srcAbsPath, String destAbsPath)
           
 void removeItem(String absPath)
           
 void save()
          During node save action log all action which was done in the session.
 
Methods inherited from class info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper
getContentDecorator, getItem, getNode, getNodeByIdentifier, getNodeByUUID, getProperty, getRootNode, getWorkspace, itemExists, nodeExists, propertyExists, wrapNode, wrapProperty, wrapWorkspace
 
Methods inherited from class info.magnolia.jcr.wrapper.DelegateSessionWrapper
addLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getRepository, getRetentionManager, getUserID, getValueFactory, getWrappedSession, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, isLive, logout, refresh, removeLockToken, setNamespacePrefix, setWrappedSession, toString, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MgnlAuditLoggingContentDecoratorSessionWrapper

public MgnlAuditLoggingContentDecoratorSessionWrapper(javax.jcr.Session session,
                                                      MgnlAuditLoggingContentDecorator contentDecorator)
Method Detail

move

public void move(String srcAbsPath,
                 String destAbsPath)
          throws javax.jcr.ItemExistsException,
                 javax.jcr.PathNotFoundException,
                 javax.jcr.version.VersionException,
                 javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.lock.LockException,
                 javax.jcr.RepositoryException
Specified by:
move in interface javax.jcr.Session
Overrides:
move in class ContentDecoratorSessionWrapper<MgnlAuditLoggingContentDecorator>
Throws:
javax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException

removeItem

public void removeItem(String absPath)
                throws javax.jcr.version.VersionException,
                       javax.jcr.lock.LockException,
                       javax.jcr.nodetype.ConstraintViolationException,
                       javax.jcr.AccessDeniedException,
                       javax.jcr.RepositoryException
Specified by:
removeItem in interface javax.jcr.Session
Overrides:
removeItem in class ContentDecoratorSessionWrapper<MgnlAuditLoggingContentDecorator>
Throws:
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

save

public void save()
          throws javax.jcr.AccessDeniedException,
                 javax.jcr.ItemExistsException,
                 javax.jcr.ReferentialIntegrityException,
                 javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.InvalidItemStateException,
                 javax.jcr.version.VersionException,
                 javax.jcr.lock.LockException,
                 javax.jcr.nodetype.NoSuchNodeTypeException,
                 javax.jcr.RepositoryException
During node save action log all action which was done in the session.

Specified by:
save in interface javax.jcr.Session
Overrides:
save in class DelegateSessionWrapper
Throws:
javax.jcr.AccessDeniedException
javax.jcr.ItemExistsException
javax.jcr.ReferentialIntegrityException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.InvalidItemStateException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.RepositoryException


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.