Interface WorkspaceFilter
- All Superinterfaces:
Dumpable
- All Known Implementing Classes:
DefaultWorkspaceFilter,ScopedWorkspaceFilter
WorkspaceFilter defined a filter for items (node or property).-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the given node path is contained (and by that also covered) in this workspace filter.booleanChecks if the given node path is covered in this workspace filter.voiddumpCoverage(@NotNull Node rootNode, @NotNull ProgressTrackerListener listener) Dumps the coverage of this filter against the given node to the listener.voiddumpCoverage(@NotNull Session session, @NotNull ProgressTrackerListener listener, boolean skipJcrContent) Dumps the coverage of this filter using the given session.@Nullable PathFilterSetgetCoveringFilterSet(@NotNull String path) Returns the filter set that covers the respective node path@NotNull List<PathFilterSet> Returns a list of path filter sets for node items.@NotNull ImportModegetImportMode(@NotNull String path) Returns the import mode for the given node path.@NotNull List<PathFilterSet> Returns a list of path filter sets for property items.@NotNull InputStreamReturns the source xml that constructs this filter It is the obligation of the caller to close the returned input stream.@NotNull StringReturns the source xml that constructs this filterbooleanincludesProperty(String propertyPath) Tests if the given workspace filter includes the given property.booleanisAncestor(@NotNull String path) Checks if the given node path is an ancestor of any of the filter sets.booleanisGloballyIgnored(@NotNull String path) Checks if the given node path is globally ignored.@NotNull WorkspaceFiltertranslate(@Nullable PathMapping mapping) Translates this workspace filter using the given path mapping.
-
Method Details
-
getFilterSets
Returns a list of path filter sets for node items.- Returns:
- the list of path filter sets.
-
getPropertyFilterSets
Returns a list of path filter sets for property items.- Returns:
- the list of path filter sets.
-
getCoveringFilterSet
Returns the filter set that covers the respective node path- Parameters:
path- the path- Returns:
- the filter set or
null
-
getImportMode
Returns the import mode for the given node path.- Parameters:
path- path to check- Returns:
- the import mode or
ImportMode.REPLACEif the given path is not covered by this filter.
-
contains
Checks if the given node path is contained (and by that also covered) in this workspace filter. It returnstrueif any of the filter sets contain the path and it's not globally ignored.If
contains(String)returnstruefor one path, alsocovers(String)would returntruefor the same path, but not vice-versa.- Parameters:
path- to check- Returns:
trueif the given path is included in this filter.
-
covers
Checks if the given node path is covered in this workspace filter. It only returnstrueif at least one of the sets covers the path and is not globally ignored.Still
contains(String)might returnfalsefor the same path in case there is some exclusion patterns matching the given path.- Parameters:
path- the path to check- Returns:
trueif the given path is covered by this filter.
-
isAncestor
Checks if the given node path is an ancestor of any of the filter sets.- Parameters:
path- the item to check- Returns:
trueif the given item is an ancestor
-
isGloballyIgnored
Checks if the given node path is globally ignored.- Parameters:
path- the path to check.- Returns:
trueif the item is globally ignored.
-
getSource
Returns the source xml that constructs this filter It is the obligation of the caller to close the returned input stream.- Returns:
- the source xml
-
getSourceAsString
Returns the source xml that constructs this filter- Returns:
- the source xml
-
translate
Translates this workspace filter using the given path mapping.- Parameters:
mapping- the path mapping- Returns:
- a new workspace filter
- Since:
- 2.4.10
-
dumpCoverage
void dumpCoverage(@NotNull @NotNull Node rootNode, @NotNull @NotNull ProgressTrackerListener listener) throws RepositoryException Dumps the coverage of this filter against the given node to the listener.- Parameters:
rootNode- root nodelistener- listener which receives coverage information- Throws:
RepositoryException- if an error occurs
-
dumpCoverage
void dumpCoverage(@NotNull @NotNull Session session, @NotNull @NotNull ProgressTrackerListener listener, boolean skipJcrContent) throws RepositoryException Dumps the coverage of this filter using the given session. IfskipJcrContentistruethe jcr:content nodes are excluded from traversal and reporting.- Parameters:
session- sessionlistener- listener which receives coverage informationskipJcrContent-trueto skip jcr:content nodes- Throws:
RepositoryException- if an error occurs
-
includesProperty
Tests if the given workspace filter includes the given property. If the filter does not cover the property, it returnstrue.- Parameters:
propertyPath- the path to the property- Returns:
trueif the property is included in the filter
-