info.magnolia.audit
Class MgnlAuditLoggingContentDecorator

java.lang.Object
  extended by info.magnolia.jcr.decoration.AbstractContentDecorator
      extended by info.magnolia.audit.MgnlAuditLoggingContentDecorator
All Implemented Interfaces:
ContentDecorator

public class MgnlAuditLoggingContentDecorator
extends AbstractContentDecorator

Magnolia audit logging content decorator for use by node, property and session wrapper classes.


Constructor Summary
MgnlAuditLoggingContentDecorator()
           
 
Method Summary
 Map<String,LinkedList<MgnlAuditLogEntry>> getLogEntries()
          Get map which contains audit-log entries of actions (Create, Modify, Delete, Move) which were done in this session and were not yet saved.
 boolean isMultipleWrapEnabled()
          Tells if multiple wrapping with this content decorator is enabled.
protected  void logActionCreate(javax.jcr.Node node)
          Method which take care of storing creation of node into audit-log entries map.
protected  void logActionCreate(String path, String workspace, javax.jcr.nodetype.NodeType nodeType, long timeStamp)
          Method which take care of storing creation of node into audit-log entries map.
protected  void logActionDelete(String path, String workspace, javax.jcr.nodetype.NodeType nodeType)
          Method which take care of storing delete action into audit-log entries map.
protected  void logActionModify(javax.jcr.Node node)
          Method which take care of storing modification action into audit-log entries map.
protected  void logActionModify(String path, String workspace, javax.jcr.nodetype.NodeType nodeType, long timeStamp)
          Method which take care of storing modification action into audit-log entries map.
 void logActionMove(String srcAbsPath, String destAbsPath, String workspace)
          Method which take care of storing move action into audit-log entries map.
 javax.jcr.Node wrapNode(javax.jcr.Node node)
          Wrap node by Magnolia audit logging node wrapper.
 javax.jcr.Property wrapProperty(javax.jcr.Property property)
          Wrap property by Magnolia audit logging property wrapper.
 javax.jcr.Session wrapSession(javax.jcr.Session session)
          Wrap session by Magnolia audit logging session wrapper.
 javax.jcr.Workspace wrapWorkspace(javax.jcr.Workspace workspace)
          Wrap workspace by Magnolia audit logging workspace wrapper.
 
Methods inherited from class info.magnolia.jcr.decoration.AbstractContentDecorator
evaluateNode, evaluateProperty, wrapNodeIterator, wrapPropertyIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MgnlAuditLoggingContentDecorator

public MgnlAuditLoggingContentDecorator()
Method Detail

getLogEntries

public Map<String,LinkedList<MgnlAuditLogEntry>> getLogEntries()
Get map which contains audit-log entries of actions (Create, Modify, Delete, Move) which were done in this session and were not yet saved.

Returns:
map of audit-log entries

wrapSession

public javax.jcr.Session wrapSession(javax.jcr.Session session)
Wrap session by Magnolia audit logging session wrapper.

Specified by:
wrapSession in interface ContentDecorator
Overrides:
wrapSession in class AbstractContentDecorator

wrapNode

public javax.jcr.Node wrapNode(javax.jcr.Node node)
Wrap node by Magnolia audit logging node wrapper.

Specified by:
wrapNode in interface ContentDecorator
Overrides:
wrapNode in class AbstractContentDecorator

wrapProperty

public javax.jcr.Property wrapProperty(javax.jcr.Property property)
Wrap property by Magnolia audit logging property wrapper.

Specified by:
wrapProperty in interface ContentDecorator
Overrides:
wrapProperty in class AbstractContentDecorator

wrapWorkspace

public javax.jcr.Workspace wrapWorkspace(javax.jcr.Workspace workspace)
Wrap workspace by Magnolia audit logging workspace wrapper.

Specified by:
wrapWorkspace in interface ContentDecorator
Overrides:
wrapWorkspace in class AbstractContentDecorator

isMultipleWrapEnabled

public boolean isMultipleWrapEnabled()
Description copied from interface: ContentDecorator
Tells if multiple wrapping with this content decorator is enabled.


logActionCreate

protected void logActionCreate(javax.jcr.Node node)
                        throws javax.jcr.RepositoryException
Method which take care of storing creation of node into audit-log entries map.

Throws:
javax.jcr.RepositoryException

logActionCreate

protected void logActionCreate(String path,
                               String workspace,
                               javax.jcr.nodetype.NodeType nodeType,
                               long timeStamp)
Method which take care of storing creation of node into audit-log entries map.


logActionModify

protected void logActionModify(javax.jcr.Node node)
                        throws javax.jcr.RepositoryException
Method which take care of storing modification action into audit-log entries map.

Throws:
javax.jcr.RepositoryException

logActionModify

protected void logActionModify(String path,
                               String workspace,
                               javax.jcr.nodetype.NodeType nodeType,
                               long timeStamp)
Method which take care of storing modification action into audit-log entries map.


logActionMove

public void logActionMove(String srcAbsPath,
                          String destAbsPath,
                          String workspace)
Method which take care of storing move action into audit-log entries map.


logActionDelete

protected void logActionDelete(String path,
                               String workspace,
                               javax.jcr.nodetype.NodeType nodeType)
Method which take care of storing delete action into audit-log entries map.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.