public class DefaultWorkspaceFilter extends Object implements Dumpable, WorkspaceFilter
PathFilterSets.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_VERSION |
static double |
SUPPORTED_VERSION |
| Constructor and Description |
|---|
DefaultWorkspaceFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(PathFilterSet set)
Add a #PathFilterSet for nodes items.
|
void |
add(PathFilterSet nodeFilter,
PathFilterSet propFilter)
Add a #PathFilterSet for node and property items.
|
void |
addPropertyFilterSet(PathFilterSet set)
Deprecated.
use
add(PathFilterSet, PathFilterSet) instead. |
boolean |
contains(String path)
Checks if the given node path is contained in this workspace filter.
|
boolean |
covers(String path)
Checks if the given node path is covered in this workspace filter.
|
void |
dump(DumpContext ctx,
boolean isLast)
Dumps some human readable information using the given context.
|
void |
dumpCoverage(Node rootNode,
ProgressTrackerListener listener)
Dumps the coverage of this filter against the given node to the listener.
|
void |
dumpCoverage(Session session,
ProgressTrackerListener listener,
boolean skipJcrContent)
Dumps the coverage of this filter using the given session.
|
boolean |
equals(Object obj) |
PathFilterSet |
getCoveringFilterSet(String path)
Returns the filter set that covers the respective node path
|
List<PathFilterSet> |
getFilterSets()
Returns a list of path filter sets for node items.
|
ImportMode |
getImportMode(String path)
Returns the import mode for the given node path.
|
List<PathFilterSet> |
getPropertyFilterSets()
Returns a list of path filter sets for property items.
|
InputStream |
getSource()
Returns the source xml that constructs this filter
It is the obligation of the caller to close the returned input stream.
|
String |
getSourceAsString()
Returns the source xml that constructs this filter
|
int |
hashCode() |
boolean |
isAncestor(String path)
Checks if the given node path is an ancestor of any of the filter sets.
|
boolean |
isGloballyIgnored(String path)
Checks if the given node path is globally ignored.
|
void |
load(Element doc) |
void |
load(File file)
Loads the workspace filter from the given file
|
void |
load(InputStream in)
Loads the workspace filter from the given input source.
|
void |
resetSource()
Reset the source content to a null state.
|
void |
setGlobalIgnored(PathFilter ignored) |
void |
setImportMode(ImportMode importMode) |
String |
toString() |
WorkspaceFilter |
translate(PathMapping mapping)
Translates this workspace filter using the given path mapping.
|
public static final String ATTR_VERSION
public static final double SUPPORTED_VERSION
public void add(PathFilterSet set)
set - the set of filters to add.public void add(PathFilterSet nodeFilter, PathFilterSet propFilter)
nodeFilter - the set of filters to add.propFilter - the set of filters to add.@Deprecated public void addPropertyFilterSet(PathFilterSet set)
add(PathFilterSet, PathFilterSet) instead.set - the set of filters to add.public List<PathFilterSet> getFilterSets()
getFilterSets in interface WorkspaceFilterpublic List<PathFilterSet> getPropertyFilterSets()
getPropertyFilterSets in interface WorkspaceFilterpublic PathFilterSet getCoveringFilterSet(String path)
getCoveringFilterSet in interface WorkspaceFilterpath - the pathnullpublic ImportMode getImportMode(String path)
getImportMode in interface WorkspaceFilterpath - path to checkImportMode.REPLACE if the given path
is not covered by this filter.public void setImportMode(ImportMode importMode)
public boolean contains(String path)
true if any of the filter sets contain the path
and it's not globally ignored.contains in interface WorkspaceFilterpath - to checktrue if the given path is included in this filter.public boolean covers(String path)
true if at least one of the sets covers
the path and is not globally ignored.covers in interface WorkspaceFilterpath - the pathto checktrue if the given path is covered by this filter.public boolean isAncestor(String path)
isAncestor in interface WorkspaceFilterpath - the item to checktrue if the given item is an ancestorpublic boolean isGloballyIgnored(String path)
isGloballyIgnored in interface WorkspaceFilterpath - the path to check.true if the item is globally ignored.public WorkspaceFilter translate(PathMapping mapping)
translate in interface WorkspaceFiltermapping - the path mappingpublic void load(File file) throws IOException, ConfigurationException
file - sourceConfigurationException - if the source is not validIOException - if an I/O error occurspublic InputStream getSource()
getSource in interface WorkspaceFilterpublic String getSourceAsString()
getSourceAsString in interface WorkspaceFilterpublic void load(InputStream in) throws IOException, ConfigurationException
The specified stream remains open after this method returns.
in - sourceConfigurationException - if the source is not validIOException - if an I/O error occurspublic void load(Element doc) throws ConfigurationException
ConfigurationExceptionpublic void dump(DumpContext ctx, boolean isLast)
public void resetSource()
public void setGlobalIgnored(PathFilter ignored)
public void dumpCoverage(Node rootNode, ProgressTrackerListener listener) throws RepositoryException
dumpCoverage in interface WorkspaceFilterrootNode - root nodelistener - listenerRepositoryException - if an error occurspublic void dumpCoverage(Session session, ProgressTrackerListener listener, boolean skipJcrContent) throws RepositoryException
skipJcrContent is true
the jcr:content nodes are excluded from traversal and reporting.dumpCoverage in interface WorkspaceFiltersession - sessionlistener - listener to report progressskipJcrContent - true to skip jcr:content nodesRepositoryException - if an error occursCopyright © 2010 - 2020 Adobe. All Rights Reserved