All Known Implementing Classes:
RootBrowsePublisher, RootBrowsePublisher.RecursiveBrowsePublisher

public interface BrowsePublisher
The BrowsePublisher interface provides a mechanism to manage and handle the browsing of hierarchical structures. This is commonly used for navigating or paginating through a collection of nodes.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Provides a builder interface for configuring and adding nodes to the browsing structure.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the current count of results that have been added.
    boolean
    Determines whether the browsing operation has been canceled.
    newNode(String typeId, String name)
    Creates a new node builder with the specified type ID and name.
    Creates and returns a new BrowsePublisher instance to continue browsing deeper into the hierarchical structure.
    void
    setContinuationPoint(String continuationPoint)
    Updates the continuation point for the browsing operation.
    void
    setTotalResultsAvailable(int totalResultsAvailable)
    Sets the total number of results that should be available for browsing.
  • Method Details

    • isCanceled

      boolean isCanceled()
      Determines whether the browsing operation has been canceled.
      Returns:
      true if the browsing operation has been canceled, false otherwise.
    • getResultCount

      int getResultCount()
      Retrieves the current count of results that have been added.
      Returns:
      the total number of results currently stored.
    • setContinuationPoint

      void setContinuationPoint(String continuationPoint)
      Updates the continuation point for the browsing operation. The continuation point is used to track the current position within a paginated or hierarchical browsing structure, enabling continuation or resumption of browsing from a specific state.
      Parameters:
      continuationPoint - the new continuation point to set, typically a string identifier representing the current position or state.
    • setTotalResultsAvailable

      void setTotalResultsAvailable(int totalResultsAvailable)
      Sets the total number of results that should be available for browsing. This value is primarily used for pagination when implementing result size limits and managing continuation points.
      Parameters:
      totalResultsAvailable - The total count of results that exist in the complete result set regardless of any pagination constraints
    • newNode

      BrowsePublisher.NodeBuilder newNode(String typeId, String name)
      Creates a new node builder with the specified type ID and name. The resulting BrowsePublisher.NodeBuilder can be used to define various properties for the node before adding it to the browsing structure.
      Parameters:
      typeId - the type identifier for the new node
      name - the name of the new node
      Returns:
      a BrowsePublisher.NodeBuilder instance to configure and add the new node
    • recurse

      BrowsePublisher recurse()
      Creates and returns a new BrowsePublisher instance to continue browsing deeper into the hierarchical structure. This is typically used when recursive browsing is required, starting from the current state or node.
      Returns:
      a BrowsePublisher for recursive browsing at a deeper level of the hierarchy