Package com.atlassian.bitbucket.content
Interface ContentTreeCallback
- All Known Implementing Classes:
AbstractContentTreeCallback
public interface ContentTreeCallback
Callback interface for streaming content tree nodes from a starting directory
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onEnd
(ContentTreeSummary summary) Called after the finaltree node
has been streamed.void
onStart
(ContentTreeContext context) Called before the firstonTreeNode(ContentTreeNode)
.boolean
onTreeNode
(ContentTreeNode node) Called once for each path in the tree.
-
Method Details
-
onEnd
Called after the finaltree node
has been streamed.Note: If the tree was empty, this method may be called immediately after
onStart(ContentTreeContext)
without any calls toonTreeNode(ContentTreeNode)
.- Parameters:
summary
- summarizes the tree request and the streamed nodes- Throws:
IOException
- may be thrown by implementations which perform I/O.
-
onStart
Called before the firstonTreeNode(ContentTreeNode)
.- Parameters:
context
- provides details about the tree request for which nodes are being streamed- Throws:
IOException
- may be thrown by implementations which perform I/O.
-
onTreeNode
Called once for each path in the tree.onStart(ContentTreeContext)
is called before any invocation of this method.onEndPage(Page)
is called after all invocations of this method.- Parameters:
node
- the current tree node- Returns:
true
if additional nodes should be provided; otherwise,false
if the provided node should be the last- Throws:
IOException
- may be thrown by implementations which perform I/O operations, such as streaming tree nodes
-