org.xwiki.ircbot.wiki
Interface WikiIRCBotListenerFactory


@Role
public interface WikiIRCBotListenerFactory

Create a Bot Listener object by gathering the Listener metadata from a document.

Since:
4.0M2
Version:
$Id: fc21fbe5210e3bc3a113eeba0235c864c043b210 $

Method Summary
 boolean containsWikiListener(org.xwiki.model.reference.DocumentReference documentReference)
          Searches the given document for a valid listener definition and for an active listener.
 org.xwiki.ircbot.internal.wiki.WikiIRCBotListener createWikiListener(org.xwiki.model.reference.DocumentReference documentReference)
          Tries to build a WikiIRCBotListener if a definition is found on the given document.
 

Method Detail

containsWikiListener

boolean containsWikiListener(org.xwiki.model.reference.DocumentReference documentReference)
Searches the given document for a valid listener definition and for an active listener.

Parameters:
documentReference - name of the document to search for a listener definition.
Returns:
true if the given document contains a listener class definition and at least one listener event class definition, false otherwise.

createWikiListener

org.xwiki.ircbot.internal.wiki.WikiIRCBotListener createWikiListener(org.xwiki.model.reference.DocumentReference documentReference)
                                                                     throws IRCBotException
Tries to build a WikiIRCBotListener if a definition is found on the given document.

Parameters:
documentReference - name of the document on which the listener is defined.
Returns:
a WikiIRCBotListener corresponding to the listener definition found.
Throws:
IRCBotException - if no listener definition is found or if an error is encountered while building the wiki listener.


Copyright © 2004-2012 XWiki. All Rights Reserved.