public interface

BranchClassifier

com.atlassian.bitbucket.branch.model.BranchClassifier

Class Overview

Represents a strategy used by branch models to classify branches belonging to a certain type, as well as return all known branches for a given branch type.

Summary

Public Methods
@Nonnull Iterable<Branch> getAllBranchesByType(BranchType branchType)
Get a list of all branches by given type.
@Nonnull Page<Branch> getBranchesByType(BranchType branchType, PageRequest pageRequest)
Get a list of branches by given type.
@Nullable BranchType getType(Branch branch)
Get type for given branch.

Public Methods

@Nonnull public Iterable<Branch> getAllBranchesByType (BranchType branchType)

Get a list of all branches by given type. The ordering of the list is arbitrary and dependent on the implementation.

Parameters
branchType branch type to query for
Returns
  • a list of all branches that are classified into branchType

@Nonnull public Page<Branch> getBranchesByType (BranchType branchType, PageRequest pageRequest)

Get a list of branches by given type. The ordering of the list is arbitrary and dependent on the implementation.

Parameters
branchType branch type to query for
pageRequest page request
Returns
  • a page of branches that are classified into branchType

@Nullable public BranchType getType (Branch branch)

Get type for given branch.

Parameters
branch branch to classify
Returns
  • type of branch, or null if the branch cannot be classified into any type known to the branch model