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(MinimalRef branch)
Get type for given branch.
@Deprecated @Nullable BranchType getType(Branch branch)
This method is deprecated. in 5.5 for removal in 6.0. Use getType(MinimalRef) instead. The new method has a looser type requirement but has an identical implementation.

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 (MinimalRef 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

@Deprecated @Nullable public BranchType getType (Branch branch)

This method is deprecated.
in 5.5 for removal in 6.0. Use getType(MinimalRef) instead. The new method has a looser type requirement but has an identical implementation.

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