info.magnolia.module.observation.commands
Class RegexEventListener

java.lang.Object
  extended by info.magnolia.module.observation.commands.CommandEventListener
      extended by info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener
          extended by info.magnolia.module.observation.commands.RegexEventListener
All Implemented Interfaces:
BaseConfiguration, javax.jcr.observation.EventListener

public class RegexEventListener
extends RestrictToNodeTypeEventListener

Event listener filtering events based not only on the node type but also based on the regular expression pattern. Only events with path matching the pattern will be processed and eventually lead to invocation of specified command.


Constructor Summary
RegexEventListener()
           
 
Method Summary
protected  String getPath(javax.jcr.observation.Event event)
           
 String getRegex()
           
 void setRegex(String regex)
           
 
Methods inherited from class info.magnolia.module.observation.commands.RestrictToNodeTypeEventListener
getConfiguration, getNodeType, setConfiguration, setNodeType
 
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

RegexEventListener

public RegexEventListener()
Method Detail

getRegex

public String getRegex()

setRegex

public void setRegex(String regex)

getPath

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


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