Interface WorkspaceFilter
-
- All Superinterfaces:
Dumpable
- All Known Implementing Classes:
DefaultWorkspaceFilter,ScopedWorkspaceFilter
public interface WorkspaceFilter extends Dumpable
WorkspaceFilterdefined a filter for items (node or property).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(java.lang.String path)Checks if the given node path is contained in this workspace filter.booleancovers(java.lang.String path)Checks if the given node path is covered in this workspace filter.voiddumpCoverage(Node rootNode, ProgressTrackerListener listener)Dumps the coverage of this filter against the given node to the listener.voiddumpCoverage(Session session, ProgressTrackerListener listener, boolean skipJcrContent)Dumps the coverage of this filter using the given session.PathFilterSetgetCoveringFilterSet(java.lang.String path)Returns the filter set that covers the respective node pathjava.util.List<PathFilterSet>getFilterSets()Returns a list of path filter sets for node items.ImportModegetImportMode(java.lang.String path)Returns the import mode for the given node path.java.util.List<PathFilterSet>getPropertyFilterSets()Returns a list of path filter sets for property items.java.io.InputStreamgetSource()Returns the source xml that constructs this filter It is the obligation of the caller to close the returned input stream.java.lang.StringgetSourceAsString()Returns the source xml that constructs this filterbooleanisAncestor(java.lang.String path)Checks if the given node path is an ancestor of any of the filter sets.booleanisGloballyIgnored(java.lang.String path)Checks if the given node path is globally ignored.WorkspaceFiltertranslate(PathMapping mapping)Translates this workspace filter using the given path mapping.
-
-
-
Method Detail
-
getFilterSets
@Nonnull java.util.List<PathFilterSet> getFilterSets()
Returns a list of path filter sets for node items.- Returns:
- the list of path filter sets.
-
getPropertyFilterSets
@Nonnull java.util.List<PathFilterSet> getPropertyFilterSets()
Returns a list of path filter sets for property items.- Returns:
- the list of path filter sets.
-
getCoveringFilterSet
@Nullable PathFilterSet getCoveringFilterSet(@Nonnull java.lang.String path)
Returns the filter set that covers the respective node path- Parameters:
path- the path- Returns:
- the filter set or
null
-
getImportMode
@Nonnull ImportMode getImportMode(@Nonnull java.lang.String path)
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
boolean contains(@Nonnull java.lang.String path)Checks if the given node path is contained in this workspace filter. It returnstrueif any of the filter sets contain the path and it's not globally ignored.- Parameters:
path- to check- Returns:
trueif the given path is included in this filter.
-
covers
boolean covers(@Nonnull java.lang.String path)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.- Parameters:
path- the pathto check- Returns:
trueif the given path is covered by this filter.
-
isAncestor
boolean isAncestor(@Nonnull java.lang.String path)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
boolean isGloballyIgnored(@Nonnull java.lang.String path)Checks if the given node path is globally ignored.- Parameters:
path- the path to check.- Returns:
trueif the item is globally ignored.
-
getSource
@Nonnull java.io.InputStream 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
@Nonnull java.lang.String getSourceAsString()
Returns the source xml that constructs this filter- Returns:
- the source xml
-
translate
@Nonnull WorkspaceFilter translate(@Nullable PathMapping mapping)
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(@Nonnull Node rootNode, @Nonnull ProgressTrackerListener listener) throws RepositoryExceptionDumps the coverage of this filter against the given node to the listener.- Parameters:
rootNode- root nodelistener- listener- Throws:
RepositoryException- if an error occurs
-
dumpCoverage
void dumpCoverage(@Nonnull Session session, @Nonnull ProgressTrackerListener listener, boolean skipJcrContent) throws RepositoryExceptionDumps the coverage of this filter using the given session. The traversal starts at the common ancestor of all filter sets. IfskipJcrContentistruethe jcr:content nodes are excluded from traversal and reporting.- Parameters:
session- sessionlistener- listener to report progressskipJcrContent-trueto skip jcr:content nodes- Throws:
RepositoryException- if an error occurs
-
-