|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.polliwog.collectors.PageCollector
public class PageCollector
A collector implementation to allow the filtering of entries that are not "pages".
This class can only work with either: RequestLineField
or RefererHeaderField
.
The collector should be inited with a comma-separated
list of file types, such as *.html, *.pdf, *.doc, *.php and so on.
Also the following special values are also supported:
setExclude(boolean)
method is provided to allow the meaning of the
pages to be reversed, i.e. consider everything to be a page except those specified.
File extension checking is case-insensitive.
Examples:
PageCollector pc = new PageCollector (); // Allow html, php, jsp pages, the root / page and pages that end with / (i.e. directory // indexes). pc.init ("*.html, *.php, *.jsp, /, */"); // Set the the specs to be reversed, that is consider everything to be a page except // those file extensions specified. pc.setExclude (true);
Last Modified By: $Author: barrygently $ Last Modified On: $Date: 2005/07/04 14:00:01 $ Current Revision: $Revision: 1.3 $
RequestLineField
,
RefererHeaderField
Constructor Summary | |
---|---|
PageCollector()
|
Method Summary | |
---|---|
boolean |
accept(AbstractField af)
The accept method. |
void |
init(java.lang.String val)
Init this collector. |
void |
setExclude(boolean e)
When true is passed to this method it causes the logic to be reversed
such that only file extensions that are not in the list are considered to be pages. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageCollector()
Method Detail |
---|
public boolean accept(AbstractField af)
RequestLineField
and RefererHeaderField
. If the path in either of the supported field
types matches then true
is returned, false
otherwise.
Note that is setExclude(boolean)
is called with true
then
the logic is reversed.
accept
in interface Collector
af
- The field to perform the check on.
true
if the field is accepted, false
if not.org.polliwog.data.LogEntryFormat#createEntry(String,Map)
public void setExclude(boolean e)
true
is passed to this method it causes the logic to be reversed
such that only file extensions that are not in the list are considered to be pages.
e
- The exclude flag.public void init(java.lang.String val) throws WeblogException
init
in interface Collector
val
- The value to init the collector with.
WeblogException
- If token is not / and not */ and does not start with "*.".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |