Commit 72f0aa8e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Refactoring work. JM-924

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6552 b35dd754-fafc-0310-a699-88a17e54d16e
parent 149115e8
...@@ -44,6 +44,11 @@ ...@@ -44,6 +44,11 @@
ContentFilter Plugin Changelog ContentFilter Plugin Changelog
</h1> </h1>
<p><b>1.4.0</b> -- January 04, 2007</p>
<ul>
<li>Now requires Wildfire 3.2.0</li>
</ul>
<p><b>1.3.1</b> -- October 06, 2006</p> <p><b>1.3.1</b> -- October 06, 2006</p>
<ul> <ul>
<li>Updated to use compression offered by Wildfire 3.1</li> <li>Updated to use compression offered by Wildfire 3.1</li>
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<name>Content Filter</name> <name>Content Filter</name>
<description>Scans message packets for defined patterns</description> <description>Scans message packets for defined patterns</description>
<author>Conor Hayes</author> <author>Conor Hayes</author>
<version>1.3.1</version> <version>1.4.0</version>
<date>10/06/2006</date> <date>01/04/2007</date>
<minServerVersion>3.1.0</minServerVersion> <minServerVersion>3.2.0</minServerVersion>
<!-- UI extension --> <!-- UI extension -->
<adminconsole> <adminconsole>
......
...@@ -15,13 +15,13 @@ import org.jivesoftware.util.EmailService; ...@@ -15,13 +15,13 @@ import org.jivesoftware.util.EmailService;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.MessageRouter; import org.jivesoftware.wildfire.MessageRouter;
import org.jivesoftware.wildfire.Session;
import org.jivesoftware.wildfire.XMPPServer; import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.container.Plugin; import org.jivesoftware.wildfire.container.Plugin;
import org.jivesoftware.wildfire.container.PluginManager; import org.jivesoftware.wildfire.container.PluginManager;
import org.jivesoftware.wildfire.interceptor.InterceptorManager; import org.jivesoftware.wildfire.interceptor.InterceptorManager;
import org.jivesoftware.wildfire.interceptor.PacketInterceptor; import org.jivesoftware.wildfire.interceptor.PacketInterceptor;
import org.jivesoftware.wildfire.interceptor.PacketRejectedException; import org.jivesoftware.wildfire.interceptor.PacketRejectedException;
import org.jivesoftware.wildfire.session.Session;
import org.jivesoftware.wildfire.user.User; import org.jivesoftware.wildfire.user.User;
import org.jivesoftware.wildfire.user.UserManager; import org.jivesoftware.wildfire.user.UserManager;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
...@@ -565,7 +565,7 @@ public class ContentFilterPlugin implements Plugin, PacketInterceptor { ...@@ -565,7 +565,7 @@ public class ContentFilterPlugin implements Plugin, PacketInterceptor {
String subject = "Content filter notification! (" String subject = "Content filter notification! ("
+ originalPacket.getFrom().getNode() + ")"; + originalPacket.getFrom().getNode() + ")";
String body = null; String body;
if (originalPacket instanceof Message) { if (originalPacket instanceof Message) {
Message originalMsg = (Message) originalPacket; Message originalMsg = (Message) originalPacket;
body = "Disallowed content detected in message from:" body = "Disallowed content detected in message from:"
......
package org.jivesoftware.wildfire.plugin; package org.jivesoftware.wildfire.plugin;
import java.io.IOException;
import java.io.StringReader;
import java.util.regex.PatternSyntaxException;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.dom4j.Document; import org.dom4j.Document;
import org.dom4j.DocumentException; import org.dom4j.DocumentException;
import org.dom4j.io.XPPPacketReader; import org.dom4j.io.XPPReader;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
import org.xmpp.packet.Message; import org.xmpp.packet.Message;
import org.xmpp.packet.Presence; import org.xmpp.packet.Presence;
import java.io.IOException;
import java.io.StringReader;
import java.util.regex.PatternSyntaxException;
/** /**
* Basic unit tests for ContentFilter. * Basic unit tests for ContentFilter.
* *
...@@ -181,7 +180,7 @@ public class ContentFilterTest extends TestCase { ...@@ -181,7 +180,7 @@ public class ContentFilterTest extends TestCase {
XPPPacketReader packetReader = new XPPPacketReader(); XPPReader packetReader = new XPPReader();
Document doc = packetReader.read(new StringReader(chatXML)); Document doc = packetReader.read(new StringReader(chatXML));
Message m = new Message(doc.getRootElement()); Message m = new Message(doc.getRootElement());
...@@ -232,7 +231,7 @@ public class ContentFilterTest extends TestCase { ...@@ -232,7 +231,7 @@ public class ContentFilterTest extends TestCase {
"</presence>"; "</presence>";
XPPPacketReader packetReader = new XPPPacketReader(); XPPReader packetReader = new XPPReader();
Document doc = packetReader.read(new StringReader(presenceXML)); Document doc = packetReader.read(new StringReader(presenceXML));
Presence p = new Presence(doc.getRootElement()); Presence p = new Presence(doc.getRootElement());
......
...@@ -49,6 +49,11 @@ ...@@ -49,6 +49,11 @@
Subscription Plugin Changelog Subscription Plugin Changelog
</h1> </h1>
<p><b>1.4.0</b> -- January 04, 2007</p>
<ul>
<li>Now requires Wildfire 3.2.0</li>
</ul>
<p><b>1.0.1</b> -- October 06, 2006</p> <p><b>1.0.1</b> -- October 06, 2006</p>
<ul> <ul>
<li>Updated to use compression offered by Wildfire 3.1</li> <li>Updated to use compression offered by Wildfire 3.1</li>
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<name>Subscription</name> <name>Subscription</name>
<description>Automatically accepts or rejects subsription requests</description> <description>Automatically accepts or rejects subsription requests</description>
<author>Ryan Graham</author> <author>Ryan Graham</author>
<version>1.0.1</version> <version>1.1.0</version>
<date>10/06/2006</date> <date>01/04/2007</date>
<url>http://www.jivesoftware.org</url> <url>http://www.jivesoftware.org</url>
<minServerVersion>3.1.0</minServerVersion> <minServerVersion>3.2.0</minServerVersion>
<adminconsole> <adminconsole>
<tab id="tab-server"> <tab id="tab-server">
......
...@@ -7,27 +7,23 @@ ...@@ -7,27 +7,23 @@
package org.jivesoftware.wildfire.plugin; package org.jivesoftware.wildfire.plugin;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.wildfire.PresenceRouter; import org.jivesoftware.wildfire.PresenceRouter;
import org.jivesoftware.wildfire.Session;
import org.jivesoftware.wildfire.XMPPServer; import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.container.Plugin; import org.jivesoftware.wildfire.container.Plugin;
import org.jivesoftware.wildfire.container.PluginManager; import org.jivesoftware.wildfire.container.PluginManager;
import org.jivesoftware.wildfire.interceptor.InterceptorManager; import org.jivesoftware.wildfire.interceptor.InterceptorManager;
import org.jivesoftware.wildfire.interceptor.PacketInterceptor; import org.jivesoftware.wildfire.interceptor.PacketInterceptor;
import org.jivesoftware.wildfire.interceptor.PacketRejectedException; import org.jivesoftware.wildfire.interceptor.PacketRejectedException;
import org.jivesoftware.wildfire.session.Session;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
import org.xmpp.packet.Presence; import org.xmpp.packet.Presence;
import org.xmpp.packet.Presence.Type; import org.xmpp.packet.Presence.Type;
import java.io.File;
import java.util.*;
/** /**
* This plugin can be configuured to automatically accept or reject subscription * This plugin can be configuured to automatically accept or reject subscription
* requests. When set to accept subscription requests users will be able to add * requests. When set to accept subscription requests users will be able to add
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment