Interface Aggregator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ArtifactSetcreateArtifacts(Aggregate aggregate)Creates the artifact set of the content aggregation.booleanhasFullCoverage()Returnstrueif this aggregator includes the entire node sub tree into the serialization;falseif it does not do a complete serialization and allows child aggregations (eg: nt:unstructured).booleanincludes(Node root, Node node, String path)Checks if the given item is included in the content aggregation relative to the respective aggregator rootbooleanincludes(Node root, Node parent, Property property, String path)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.booleanisDefault()Checks if this aggregator is the default aggregator.booleanmatches(Node node, String path)Checks if this aggregator can handles the given nodeImportInforemove(Node node, boolean recursive, boolean trySave)Removes the content for this aggregation.
-
-
-
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, 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 checkpath- the path of the node ornull- Returns:
trueif the node is included;falseotherwise.- Throws:
RepositoryException- if an error occurs.
-
includes
boolean includes(Node root, Node parent, Property property, 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 checkproperty- the property to checkpath- the path of the property ornull- Returns:
trueif the node is included;falseotherwise.- Throws:
RepositoryException- if an error occurs.
-
matches
boolean matches(Node node, String path) throws RepositoryException
Checks if this aggregator can handles the given node- Parameters:
node- the node to checkpath- the path of the node ornull- Returns:
trueif this aggregator will handle the node;falseotherwise.- Throws:
RepositoryException- if an error occurs.
-
hasFullCoverage
boolean hasFullCoverage()
Returnstrueif this aggregator includes the entire node sub tree into the serialization;falseif it does not do a complete serialization and allows child aggregations (eg: nt:unstructured).- Returns:
trueif this aggregator aggregates all children.
-
isDefault
boolean isDefault()
Checks if this aggregator is the default aggregator.- Returns:
trueif 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. Ifrecursiveistrueit 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 removerecursive-trueif all content is to be removed.trySave- iftruethe aggregator tries to save the modified content.- Returns:
- ImportInfo infos about the modification
- Throws:
RepositoryException- if an error occurs.
-
-