public interface ContentTreeCallback
Note: Implementors are strongly encouraged to extend from AbstractContentTreeCallback
. This interface
will change, over time, and any class implementing it directly will be broken by such changes. Extending from
the abstract class will help prevent such breakages.
AbstractContentTreeCallback
Modifier and Type | Method and Description |
---|---|
void |
onEnd(ContentTreeSummary summary)
Called after the final
tree node has been streamed. |
void |
onStart(ContentTreeContext context)
Called before the first
onTreeNode(ContentTreeNode) . |
boolean |
onTreeNode(ContentTreeNode node)
Called once for each path in the tree.
|
void onEnd(@Nonnull ContentTreeSummary summary) throws IOException
tree node
has been streamed.
Note: If the tree was empty, this method may be called immediately after onStart(ContentTreeContext)
without any calls to onTreeNode(ContentTreeNode)
.
summary
- summarizes the tree request and the streamed nodesIOException
- may be thrown by implementations which perform I/O.void onStart(@Nonnull ContentTreeContext context) throws IOException
onTreeNode(ContentTreeNode)
.context
- provides details about the tree request for which nodes are being streamedIOException
- may be thrown by implementations which perform I/O.boolean onTreeNode(@Nonnull ContentTreeNode node) throws IOException
onStart(ContentTreeContext)
is called before any invocation of this method.
onEndPage(Page)
is called after all invocations of this method.node
- the current tree nodetrue
if additional nodes should be provided; otherwise, false
if the provided node should
be the lastIOException
- may be thrown by implementations which perform I/O operations, such as streaming tree nodesCopyright © 2019 Atlassian. All rights reserved.