import mir.log.LoggerWrapper;
+/** A producer is a task. producers are mostly used to generate pages
+ * but occasionally, producers are used to do other stuff such as
+ * pull rss feeds. The producers are configured through the
+ * producers.xml file. Producers appear, for example, on the
+ * admin->"Generate manually"->"advanced page": (Tasks)
+ */
public interface Producer {
/**
*
reload();
}
/** applies all filters from all filter groups to an Entity.
- * The entity may be, for example, an article, or a comment.
+ * The entity may be, for example, an article, or a comment.
+ * It returns a filter that matches if it finds one, null otherwise
*/
public Filter testPosting(Entity anEntity, Request aRequest) {
Iterator i = filterGroups.iterator();
return entity.getFieldValue("name");
}
}
+
/** This class reflects a row of the filter database table.
* To actually run a filter on data, use the test() method.
* This class will automatically retreive and use the correct
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;
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();
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();