Package com.atlassian.bitbucket.content
Class AbstractContentTreeCallback
java.lang.Object
com.atlassian.bitbucket.content.AbstractContentTreeCallback
- All Implemented Interfaces:
ContentTreeCallback
Convenience implementation of
ContentTreeCallback
that provides no-op implementations for all methods.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onEnd
(ContentTreeSummary summary) Called after the finaltree node
has been streamed.void
onStart
(ContentTreeContext context) Called before the firstContentTreeCallback.onTreeNode(ContentTreeNode)
.boolean
onTreeNode
(ContentTreeNode node) Discards the providedContentTreeNode
and returnstrue
to continue streaming.
-
Constructor Details
-
AbstractContentTreeCallback
public AbstractContentTreeCallback()
-
-
Method Details
-
onEnd
Description copied from interface:ContentTreeCallback
Called after the finaltree node
has been streamed.Note: If the tree was empty, this method may be called immediately after
ContentTreeCallback.onStart(ContentTreeContext)
without any calls toContentTreeCallback.onTreeNode(ContentTreeNode)
.- Specified by:
onEnd
in interfaceContentTreeCallback
- Parameters:
summary
- summarizes the tree request and the streamed nodes- Throws:
IOException
- may be thrown by implementations which perform I/O.
-
onStart
Description copied from interface:ContentTreeCallback
Called before the firstContentTreeCallback.onTreeNode(ContentTreeNode)
.- Specified by:
onStart
in interfaceContentTreeCallback
- 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
Discards the providedContentTreeNode
and returnstrue
to continue streaming.- Specified by:
onTreeNode
in interfaceContentTreeCallback
- Parameters:
node
- the current tree node- Returns:
true
if further nodes should be streamed; otherwise,false
to stop streaming- Throws:
IOException
- may be thrown by implementations which perform I/O operations, such as streaming tree nodes
-