info.magnolia.module.observation.commands
Class CommandEventListener

java.lang.Object
  extended by info.magnolia.module.observation.commands.CommandEventListener
All Implemented Interfaces:
javax.jcr.observation.EventListener
Direct Known Subclasses:
RestrictToNodeTypeEventListener

public class CommandEventListener
extends Object
implements javax.jcr.observation.EventListener

This is a eventListener wrapper for the commands to be executed when an event occurs.

Author:
tmiyar

Constructor Summary
CommandEventListener()
           
 
Method Summary
protected  boolean checkIfEventIsProcessed(javax.jcr.observation.Event event)
           
 org.apache.commons.chain.Command getCommand()
           
 Map getParams()
           
protected  String getPath(javax.jcr.observation.Event event)
           
 void onEvent(javax.jcr.observation.EventIterator events)
          Implementation of the onEvent method that will execute the defined command.
 void setCommand(org.apache.commons.chain.Command command)
           
 void setParams(Map params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandEventListener

public CommandEventListener()
Method Detail

onEvent

public void onEvent(javax.jcr.observation.EventIterator events)
Implementation of the onEvent method that will execute the defined command.

Specified by:
onEvent in interface javax.jcr.observation.EventListener

checkIfEventIsProcessed

protected boolean checkIfEventIsProcessed(javax.jcr.observation.Event event)
                                   throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getPath

protected String getPath(javax.jcr.observation.Event event)
                  throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getCommand

public org.apache.commons.chain.Command getCommand()

setCommand

public void setCommand(org.apache.commons.chain.Command command)

getParams

public Map getParams()

setParams

public void setParams(Map params)


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