blob: 319ce4983056aead69be48e2549eccc404f8d3ab [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ecf.presence.bot">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.ecf.presence.bot" id="chatRoomMessageHandler" name="Chat Room Message Handler"/>
</appInfo>
<documentation>
This extension point allows message handlers to be associated with a given chatroomrobot (via chatroomrobotid attribute). Note that the chatroomrobotid must exist or the handler will not be called.
</documentation>
</annotation>
<element name="extension">
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="handler"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="handler">
<annotation>
<documentation>
The chat room message handler
</documentation>
</annotation>
<complexType>
<attribute name="chatRoomRobotId" type="string" use="required">
<annotation>
<documentation>
Required chatRoomRobotId. The value of this field must match a chatRoomRobot id
</documentation>
</annotation>
</attribute>
<attribute name="filterExpression" type="string">
<annotation>
<documentation>
Optional filter expression. If filterexpression is provided, then chatroom messages will be filtered via given regular expression. If match, then the handleChatRoomMessage method will be called. If not matched, then the received message will be ignored.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class of the message handler instance to create. Must implement &lt;b&gt;org.eclipse.ecf.presence.bot.IChatRoomMessageHandler&lt;/b&gt;.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.ecf.presence.bot.IChatRoomMessageHandler"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
1.0.0 milestone 6
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.presence.bot.chatRoomMessageHandler&quot;&gt;
&lt;handler
chatRoomRobotId=&quot;org.eclipse.ecf.presence.bot.defaultbot&quot;
class=&quot;org.eclipse.ecf.presence.bot.DefaultChatRoomMessageHandler&quot;&gt;
&lt;/handler&gt;
&lt;/extension&gt;
&lt;/pre&gt;
Note that the given chatroomrobotid=&lt;b&gt;org.eclipse.ecf.presence.bot.defaultbot&lt;/b&gt; must be previously defined via the chatroomrobot extension point. Here is an example:
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.presence.bot.chatRoomRobot&quot;&gt;
&lt;chatRoomRobot
chat
chatRoom=&quot;#eclipse-ecf&quot;
connectId=&quot;irc://slewis2_@irc.freenode.net&quot;
containerFactoryName=&quot;ecf.irc.irclib&quot;
id=&quot;org.eclipse.ecf.presence.bot.defaultbot&quot;&gt;
&lt;/chatRoomRobot&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
The class implementation provided in extension point must implement the following interface:
&lt;pre&gt;
public interface IChatRoomMessageHandler extends IChatRoomContainerAdvisor {
/**
* This method is called when a {@link IChatRoomMessage} is received.
*
* @param message
* the {@link IChatRoomMessage} received. Will not be
* &lt;code&gt;null&lt;/code&gt;. Implementers should not block the
* calling thread. Any methods on the given &lt;code&gt;message&lt;/code&gt;
* parameter may be called.
*/
public void handleRoomMessage(IChatRoomMessage message);
}
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
No supplied implementation.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
Copyright (c) 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
</documentation>
</annotation>
</schema>