public class

AbstractContentTreeCallback

extends Object
implements ContentTreeCallback2
java.lang.Object
   ↳ com.atlassian.stash.content.AbstractContentTreeCallback

Class Overview

Convenience implementation of ContentTreeCallback that provides no-op implementations for all the methods.

Summary

Public Constructors
AbstractContentTreeCallback()
Public Methods
void onEndPage(Page<?> page)
Called after onStartPage(int)
void onStartPage(int index)
boolean onTreeNode(String contentId, String path, ContentTreeNode.Type type)
Called once for each file path.
boolean onTreeNode(ContentTreeNode node)
Called once for each file path.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.stash.content.ContentTreeCallback
From interface com.atlassian.stash.content.ContentTreeCallback2

Public Constructors

public AbstractContentTreeCallback ()

Public Methods

public void onEndPage (Page<?> page)

Called after onStartPage(int)

Parameters
page information about the page streamed to the callback. The page.getValues() will return null as the callback has already received the data. This is used to know information about the number of elements processed and whether there is more content to be retrieved in the future
Throws
IOException

public void onStartPage (int index)

Called before onTreeNode(String, String, ContentTreeNode.Type). It provides the callback the index of the starting element of the page.

Parameters
index the index of the starting element of the page
Throws
IOException

public boolean onTreeNode (String contentId, String path, ContentTreeNode.Type type)

Called once for each file path. onStartPage(int) is called before any invocation of this method. onEndPage(Page) is called after all invocations of this method.

Parameters
contentId a unique identifier for the content node
path the path to the content node
type the type of the content node
Returns
  • true if additional nodes should be provided; otherwise, false if the provided node should be the last
Throws
IOException

public boolean onTreeNode (ContentTreeNode node)

Called once for each file path. onStartPage(int) is called before any invocation of this method. onEndPage(com.atlassian.stash.util.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