Interface WorkspaceFilter

    • 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.REPLACE if 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 returns true if any of the filter sets contain the path and it's not globally ignored.
        Parameters:
        path - to check
        Returns:
        true if 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 returns true if at least one of the sets covers the path and is not globally ignored.
        Parameters:
        path - the pathto check
        Returns:
        true if 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:
        true if 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:
        true if 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
                          Session session,
                          @Nonnull
                          ProgressTrackerListener listener,
                          boolean skipJcrContent)
                   throws RepositoryException
        Dumps the coverage of this filter using the given session. The traversal starts at the common ancestor of all filter sets. If skipJcrContent is true the jcr:content nodes are excluded from traversal and reporting.
        Parameters:
        session - session
        listener - listener to report progress
        skipJcrContent - true to skip jcr:content nodes
        Throws:
        RepositoryException - if an error occurs