|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.content.ContentFilter
danger.content.PathFilter
public class PathFilter
A filter that is based on path.
Here's an example of a path filter that includes all files under a particular path:
PathFilter pathFilter = new PathFilter();
pathFilter.includePath("/removable0/themes", -1);
| Field Summary | |
|---|---|
static int |
PATH_FILTER_INCLUDE_ALL
|
static int |
PATH_FILTER_INCLUDE_ONLY_ME
|
| Constructor Summary | |
|---|---|
PathFilter()
Construct a new filter that by default excludes all paths. |
|
PathFilter(boolean includeAll)
Construct a new filter that uses the specified flag to determine whether it includes or excludes all paths by default. |
|
| Method Summary | |
|---|---|
boolean |
accept(ContentFile file)
The filtering logic. |
void |
dump()
Used for debugging purposes. |
void |
excludePath(String path)
Specify a path to exclude from the filter. |
void |
includePath(String path,
int depth)
Specify a path to include in the filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PATH_FILTER_INCLUDE_ALL
public static final int PATH_FILTER_INCLUDE_ONLY_ME
| Constructor Detail |
|---|
public PathFilter()
public PathFilter(boolean includeAll)
| Method Detail |
|---|
public void includePath(String path,
int depth)
The depth parameter is used as follows:
path - Path to include.depth - The number of directory levels under this path to include in
the filter, as described above.
IllegalStateException - if filter is inclusivepublic void excludePath(String path)
IllegalStateException - if filter is exclusive
public boolean accept(ContentFile file)
throws StoreException
ContentFilter
accept in class ContentFilterStoreExceptionpublic void dump()
ContentFilter
dump in class ContentFilter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||