adding doc
[mir.git] / source / mircoders / global / Abuse.java
index 360a592..a6afb11 100755 (executable)
@@ -62,7 +62,13 @@ import mircoders.localizer.MirAdminInterfaceLocalizer;
 
 import org.apache.commons.collections.ExtendedProperties;
 
-
+/**
+ *  This class manages abuse (spam, offending material, etc.). This
+ *  is done by using a set of filters managed by the FilterEngine class.
+ *  Filters may be of different types (IP, throttle, regexp...), 
+ *  but are created and configured in a single user interface (web page),
+ *  and are stored in a single database table called "filter". 
+ */
 public class Abuse {
   private LoggerWrapper logger;
   private int logSize;
@@ -136,7 +142,11 @@ public class Abuse {
 
     return false;
   }
-
+  /** Checks if there is a filter that matches a comment and takes 
+   * appropriate action (as configured in the xxxxxaction field of 
+   * the filter table). The actual matching is delegated to the 
+   * FilterEngine class. 
+   */
   public void checkComment(EntityComment aComment, Request aRequest, HttpServletResponse aResponse) {
     try {
       long time = System.currentTimeMillis();
@@ -172,7 +182,11 @@ public class Abuse {
       logger.error("Exception thrown while checking comment", t);
     }
   }
-
+  /** Checks if there is a filter that matches an articleand takes 
+   * appropriate action (as configured in the xxxxxaction field of 
+   * the filter table). The actual matching is delegated to the 
+   * FilterEngine class. 
+   */
   public void checkArticle(EntityContent anArticle, Request aRequest, HttpServletResponse aResponse) {
     try {
       long time = System.currentTimeMillis();