public class HierarchicalPackageFilter extends java.lang.Object implements PackageFilter
HierarchicalPackageFilter implements a
PackageFilter that matches all handles below the specified one
or is equal to the specified one.
For example:/content/en.
/conent/en
/content/en/company
/content/en/company/finance
/content/en/people
etc.
| Constructor and Description |
|---|
HierarchicalPackageFilter(java.lang.String handle)
Creates a new
HierarchicalPackageFilter with the specified
handle. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns
true if this HierarchicalPackageFilter
is equal to another object obj. |
java.lang.String[] |
getTraversalStartPoint()
Returns the 'best' starting points for a traversal, in order to get
all handles that are covered by this filter.
|
int |
hashCode()
Returns the hashCode of this
HierarchicalPackageFilter. |
boolean |
matches(Page page)
Compute if the handle of the page and eventual its content matches the
rules of the filter.
|
boolean |
matches(java.lang.String handle)
Compute if the handle matches the rules of the filter.
|
boolean |
matches(Ticket ticket,
java.lang.String handle)
Compute if the handle and eventual its content matches the rules of the
filter.
|
java.lang.String |
toString()
Returns a
String representation of this HierarchicalPackageFilter. |
public HierarchicalPackageFilter(java.lang.String handle)
HierarchicalPackageFilter with the specified
handle.handle - the handle to match againstpublic boolean matches(java.lang.String handle)
PackageFiltermatches in interface PackageFilterhandle - handle to be checkedtrue if the handle matches the rules of the filter;
false otherwise.PackageFilter.matches(String)public boolean matches(Ticket ticket, java.lang.String handle)
PackageFiltermatches in interface PackageFilterticket - ticket for eventual contentbus accesseshandle - handle to be checkedtrue if the handle matches the rules of the filter;
false otherwise.PackageFilter.matches(Ticket, String)public boolean matches(Page page)
PackageFiltermatches in interface PackageFilterpage - page to be checkedtrue if the handle matches the rules of the filter;
false otherwise.PackageFilter.matches(Page)public java.lang.String[] getTraversalStartPoint()
PackageFiltergetTraversalStartPoint in interface PackageFilternull if not starting points
can be given.PackageFilter.getTraversalStartPoint()public java.lang.String toString()
String representation of this HierarchicalPackageFilter.toString in class java.lang.ObjectString representation of this HierarchicalPackageFilter.public boolean equals(java.lang.Object obj)
true if this HierarchicalPackageFilter
is equal to another object obj.equals in class java.lang.Objectobj - the object to test for equality.true if this HierarchicalPackageFilter
is equal to another object obj; false otherwise.public int hashCode()
HierarchicalPackageFilter.hashCode in class java.lang.ObjectHierarchicalPackageFilter.