org.exoplatform.wiki.service.jcrext
Class WikiPageJcrListener

java.lang.Object
  extended by org.exoplatform.wiki.service.jcrext.WikiPageJcrListener
All Implemented Interfaces:
org.apache.commons.chain.Command, org.exoplatform.services.command.action.Action

public class WikiPageJcrListener
extends Object
implements org.exoplatform.services.command.action.Action

A Jcr listener for listening when a wiki page is added or modified.
It's implemented to execute PageWikiListener#postAddPage(String, String, String) of listeners registered to WikiService by users. It's installed by following configuration:

 <external-component-plugins>
   <target-component>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</target-component>
   <component-plugin>
     <name>Page Listeners</name>
     <set-method>addPlugin</set-method>
     <type>org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin</type>
    <description>add actions plugin</description>
       <init-params>
         <object-param>
           <name>actions</name>
           <object type="org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin$ActionsConfig">
             <field  name="actions">
               <collection type="java.util.ArrayList">
                 <value>
                   <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
                     <field  name="eventTypes"><string>addNode</string></field>
                     <field  name="nodeTypes"><string>wiki:attachment</string></field>
                     <field  name="actionClassName"><string>org.exoplatform.wiki.service.jcrext.WikiPageJcrListener</string></field>
                   </object>
                 </value>
               </collection>
             </field>
           </object>
         </object-param>
       </init-params>
     </component-plugin>
  </external-component-plugins>
  
 


Created by The eXo Platform SAS


Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
WikiPageJcrListener()
           
 
Method Summary
 boolean execute(org.apache.commons.chain.Context context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiPageJcrListener

public WikiPageJcrListener()
Method Detail

execute

public boolean execute(org.apache.commons.chain.Context context)
                throws Exception
Specified by:
execute in interface org.apache.commons.chain.Command
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.