public class ScopedWorkspaceFilter extends DefaultWorkspaceFilter
ATTR_VERSION, SUPPORTED_VERSION| Constructor and Description |
|---|
ScopedWorkspaceFilter(DefaultWorkspaceFilter base,
boolean allow,
String[] roots) |
| 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)
Add a #PathFilterSet for properties items.
|
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.
|
static ScopedWorkspaceFilter |
createApplicationScoped(DefaultWorkspaceFilter base) |
static ScopedWorkspaceFilter |
createContentScoped(DefaultWorkspaceFilter base) |
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.
|
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
|
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(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) |
WorkspaceFilter |
translate(PathMapping mapping)
Translates this workspace filter using the given path mapping.
|
equals, hashCode, load, toStringpublic ScopedWorkspaceFilter(DefaultWorkspaceFilter base, boolean allow, String[] roots)
public static ScopedWorkspaceFilter createApplicationScoped(DefaultWorkspaceFilter base)
public static ScopedWorkspaceFilter createContentScoped(DefaultWorkspaceFilter base)
public void add(PathFilterSet set)
DefaultWorkspaceFilteradd in class DefaultWorkspaceFilterset - the set of filters to add.public void add(PathFilterSet nodeFilter, PathFilterSet propFilter)
DefaultWorkspaceFilteradd in class DefaultWorkspaceFilternodeFilter - the set of filters to add.propFilter - the set of filters to add.public void addPropertyFilterSet(PathFilterSet set)
DefaultWorkspaceFilteraddPropertyFilterSet in class DefaultWorkspaceFilterset - the set of filters to add.public List<PathFilterSet> getFilterSets()
DefaultWorkspaceFiltergetFilterSets in interface WorkspaceFiltergetFilterSets in class DefaultWorkspaceFilterpublic List<PathFilterSet> getPropertyFilterSets()
DefaultWorkspaceFiltergetPropertyFilterSets in interface WorkspaceFiltergetPropertyFilterSets in class DefaultWorkspaceFilterpublic PathFilterSet getCoveringFilterSet(String path)
DefaultWorkspaceFiltergetCoveringFilterSet in interface WorkspaceFiltergetCoveringFilterSet in class DefaultWorkspaceFilterpath - the pathnullpublic ImportMode getImportMode(String path)
DefaultWorkspaceFiltergetImportMode in interface WorkspaceFiltergetImportMode in class DefaultWorkspaceFilterpath - path to checkImportMode.REPLACE if the given path
is not covered by this filter.public void setImportMode(ImportMode importMode)
setImportMode in class DefaultWorkspaceFilterpublic boolean contains(String path)
DefaultWorkspaceFiltertrue if any of the filter sets contain the path
and it's not globally ignored.contains in interface WorkspaceFiltercontains in class DefaultWorkspaceFilterpath - to checktrue if the given path is included in this filter.public boolean covers(String path)
DefaultWorkspaceFiltertrue if at least one of the sets covers
the path and is not globally ignored.covers in interface WorkspaceFiltercovers in class DefaultWorkspaceFilterpath - the pathto checktrue if the given path is covered by this filter.public boolean isAncestor(String path)
DefaultWorkspaceFilterisAncestor in interface WorkspaceFilterisAncestor in class DefaultWorkspaceFilterpath - the item to checktrue if the given item is an ancestorpublic boolean isGloballyIgnored(String path)
DefaultWorkspaceFilterisGloballyIgnored in interface WorkspaceFilterisGloballyIgnored in class DefaultWorkspaceFilterpath - the path to check.true if the item is globally ignored.public WorkspaceFilter translate(PathMapping mapping)
DefaultWorkspaceFiltertranslate in interface WorkspaceFiltertranslate in class DefaultWorkspaceFiltermapping - the path mappingpublic void load(File file) throws IOException, ConfigurationException
DefaultWorkspaceFilterload in class DefaultWorkspaceFilterfile - sourceIOException - if an I/O error occursConfigurationException - if the source is not validpublic InputStream getSource()
DefaultWorkspaceFiltergetSource in interface WorkspaceFiltergetSource in class DefaultWorkspaceFilterpublic String getSourceAsString()
DefaultWorkspaceFiltergetSourceAsString in interface WorkspaceFiltergetSourceAsString in class DefaultWorkspaceFilterpublic void load(InputStream in) throws IOException, ConfigurationException
DefaultWorkspaceFilterThe specified stream remains open after this method returns.
load in class DefaultWorkspaceFilterin - sourceIOException - if an I/O error occursConfigurationException - if the source is not validpublic void dump(DumpContext ctx, boolean isLast)
DefaultWorkspaceFilterdump in interface Dumpabledump in class DefaultWorkspaceFilterctx - the dump contextisLast - specifies if this is the last element to dump on this levelpublic void resetSource()
DefaultWorkspaceFilterresetSource in class DefaultWorkspaceFilterpublic void setGlobalIgnored(PathFilter ignored)
setGlobalIgnored in class DefaultWorkspaceFilterpublic void dumpCoverage(Node rootNode, ProgressTrackerListener listener) throws RepositoryException
DefaultWorkspaceFilterdumpCoverage in interface WorkspaceFilterdumpCoverage in class DefaultWorkspaceFilterrootNode - root nodelistener - listenerRepositoryException - if an error occurspublic void dumpCoverage(Session session, ProgressTrackerListener listener, boolean skipJcrContent) throws RepositoryException
DefaultWorkspaceFilterskipJcrContent is true
the jcr:content nodes are excluded from traversal and reporting.dumpCoverage in interface WorkspaceFilterdumpCoverage in class DefaultWorkspaceFiltersession - sessionlistener - listener to report progressskipJcrContent - true to skip jcr:content nodesRepositoryException - if an error occursCopyright © 2010 - 2020 Adobe. All Rights Reserved