info.magnolia.module.observation.commands
Class SpecifiedNodeTypeOnlyEventListener

java.lang.Object
  extended by info.magnolia.module.observation.commands.CommandEventListener
      extended by info.magnolia.module.observation.commands.SpecifiedNodeTypeOnlyEventListener
All Implemented Interfaces:
javax.jcr.observation.EventListener

public class SpecifiedNodeTypeOnlyEventListener
extends CommandEventListener

Event listener class that will react only and only if node type of the event (for node added/removed events) or parent node type (for property added/changed/removed events) is in the list of included node types and not in list of excluded node types.


Constructor Summary
SpecifiedNodeTypeOnlyEventListener()
           
 
Method Summary
 void addExclude(String exclude)
           
 void addInclude(String include)
           
 List<String> getExcludes()
           
 List<String> getIncludes()
           
protected  String getPath(javax.jcr.observation.Event event)
           
 void setExcludes(List<String> excludes)
           
 void setIncludes(List<String> includes)
           
 
Methods inherited from class info.magnolia.module.observation.commands.CommandEventListener
checkIfEventIsProcessed, getCommand, getParams, onEvent, setCommand, setParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecifiedNodeTypeOnlyEventListener

public SpecifiedNodeTypeOnlyEventListener()
Method Detail

getPath

protected String getPath(javax.jcr.observation.Event event)
                  throws javax.jcr.RepositoryException
Overrides:
getPath in class CommandEventListener
Throws:
javax.jcr.RepositoryException

getIncludes

public List<String> getIncludes()

setIncludes

public void setIncludes(List<String> includes)

addInclude

public void addInclude(String include)

getExcludes

public List<String> getExcludes()

setExcludes

public void setExcludes(List<String> excludes)

addExclude

public void addExclude(String exclude)


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.