|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.nntp.NewsGroupFilter
public class NewsGroupFilter
Filters news group names according to those that match the patterns passed to the filter. A filter list looks like:
rec.sports.*,comp.*,!comp.linux.*,alt.sports.soccer
The astrisk (*) is used as a wildcard and is expanded to match any pattern (can be used with a name such as foo.*.wombat to match foo.test.wombat). A leading exclamation point (!) is used to negate the match (all group names matching that name do not match). Matches are applied in the order listed in the case of matches that change membership if applied in separate order. The filter also accepts distribution lists which specify the prefix a group name must contain in order to match:
foo.groups,boo
Note that distribution lists are equivalent to match names with a trailing .* added to the pattern. In the example above, it would have been the same as adding the filter list foo.groups.*,boo.* to the end of the list.
Field Summary | |
---|---|
static NewsGroupFilter |
MATCH_ALL
Static filter that matches all groups. |
Constructor Summary | |
---|---|
NewsGroupFilter()
|
Method Summary | |
---|---|
void |
addDistributionList(java.lang.String list)
Add a ditribution list using standard RFC977 group distribution format (matches any dot prefix of a group name). |
void |
addFilterList(java.lang.String list)
Add a new filter list using standard RFC977 group filter format (wildcards indicated with stars). |
long |
getGroupID()
Obtains the group ID this filter matches if isSingleGroupFilter() returns true. |
int |
getNameFilterCount()
Obtains the number of name matching patterns installed in this filter. |
static NewsGroupFilter |
getSingleGroupByIDFilter(long id)
Generate a filter for a single group ID. |
NNTPDate |
getStartDate()
Returns the date all groups creation date must follow (NEWGROUPS command) or null if this is not a new group filter. |
boolean |
isSingleGroupFilter()
Obtains a flag indicating if the filter is for a single group. |
boolean |
matches(java.lang.String name)
Tests a group name to see if it matches this filter. |
void |
setStartDate(NNTPDate start)
Sets the start date for NEWGROUPS matching. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final NewsGroupFilter MATCH_ALL
Constructor Detail |
---|
public NewsGroupFilter()
Method Detail |
---|
public static NewsGroupFilter getSingleGroupByIDFilter(long id)
id
- the ID of the group to locate.
public boolean isSingleGroupFilter()
public long getGroupID()
public void setStartDate(NNTPDate start)
start
- the start date that the creation date
of matching groups must follow or null if no date matching is required.public NNTPDate getStartDate()
public int getNameFilterCount()
public void addFilterList(java.lang.String list)
list
- the list of groups to filter by.public void addDistributionList(java.lang.String list)
list
- the distribution list to filter by.public boolean matches(java.lang.String name)
name
- the name of the group to check.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |