Interface Aggregator

  • All Superinterfaces:
    Dumpable

    public interface Aggregator
    extends Dumpable
    Defines an artifact aggregator. It provides the Aggregate with the respective artifacts depending on the implementation and content.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ArtifactSet createArtifacts​(Aggregate aggregate)
      Creates the artifact set of the content aggregation.
      boolean hasFullCoverage()
      Returns true if this aggregator includes the entire node sub tree into the serialization; false if it does not do a complete serialization and allows child aggregations (eg: nt:unstructured).
      boolean includes​(Node root, Node node, java.lang.String path)
      Checks if the given item is included in the content aggregation relative to the respective aggregator root
      boolean includes​(Node root, Node parent, Property property, java.lang.String path)
      Checks if the given property is included in the content aggregation relative to the respective aggregator root.
      boolean isDefault()
      Checks if this aggregator is the default aggregator.
      boolean matches​(Node node, java.lang.String path)
      Checks if this aggregator can handles the given node
      ImportInfo remove​(Node node, boolean recursive, boolean trySave)
      Removes the content for this aggregation.
      • Methods inherited from interface org.apache.jackrabbit.vault.fs.api.Dumpable

        dump
    • Method Detail

      • createArtifacts

        ArtifactSet createArtifacts​(Aggregate aggregate)
                             throws RepositoryException
        Creates the artifact set of the content aggregation.
        Parameters:
        aggregate - the aggregate from which the artifacts are created.
        Returns:
        the artifact set of the content aggregation.
        Throws:
        RepositoryException - if an error occurs.
      • includes

        boolean includes​(Node root,
                         Node node,
                         java.lang.String path)
                  throws RepositoryException
        Checks if the given item is included in the content aggregation relative to the respective aggregator root
        Parameters:
        root - the root of the aggregation.
        node - the node to check
        path - the path of the node or null
        Returns:
        true if the node is included; false otherwise.
        Throws:
        RepositoryException - if an error occurs.
      • includes

        boolean includes​(Node root,
                         Node parent,
                         Property property,
                         java.lang.String path)
                  throws RepositoryException
        Checks if the given property is included in the content aggregation relative to the respective aggregator root. this is a speed optimized variant so that property.getParent() does not need to be called.
        Parameters:
        root - the root of the aggregation.
        parent - the parent node of the property to check
        property - the property to check
        path - the path of the property or null
        Returns:
        true if the node is included; false otherwise.
        Throws:
        RepositoryException - if an error occurs.
      • matches

        boolean matches​(Node node,
                        java.lang.String path)
                 throws RepositoryException
        Checks if this aggregator can handles the given node
        Parameters:
        node - the node to check
        path - the path of the node or null
        Returns:
        true if this aggregator will handle the node; false otherwise.
        Throws:
        RepositoryException - if an error occurs.
      • hasFullCoverage

        boolean hasFullCoverage()
        Returns true if this aggregator includes the entire node sub tree into the serialization; false if it does not do a complete serialization and allows child aggregations (eg: nt:unstructured).
        Returns:
        true if this aggregator aggregates all children.
      • isDefault

        boolean isDefault()
        Checks if this aggregator is the default aggregator.
        Returns:
        true if this aggregator is the default aggregator.
      • remove

        ImportInfo remove​(Node node,
                          boolean recursive,
                          boolean trySave)
                   throws RepositoryException
        Removes the content for this aggregation. If this aggregator allows child aggregations it may fail if it's not possible to remove only parts of the content. If recursive is true it must not fail due to that reason, though.

        The aggregator may become invalid after the removal of the content and subsequent calls may throw an exception.

        Parameters:
        node - the node of the aggregation to remove
        recursive - true if all content is to be removed.
        trySave - if true the aggregator tries to save the modified content.
        Returns:
        ImportInfo infos about the modification
        Throws:
        RepositoryException - if an error occurs.