public interface

RefMatcher

com.atlassian.bitbucket.repository.ref.restriction.RefMatcher

Class Overview

A RefMatcher defines what is restricted by a given restriction.

Summary

Public Methods
@Nonnull String getDisplayId()
The displayId can be any string.
@OptionalString String getId()
The restriction ID can be any string.
@Nonnull RefMatcherType getType()
boolean isActive()
A RefMatcher can be inactive.
boolean matches(MinimalRef ref)
Determines whether or not a given MinimalRef matches the RefMatcher.

Public Methods

@Nonnull public String getDisplayId ()

The displayId can be any string. For a branch this could be the branch name, for example 'master'.

Returns
  • the ID of the RefMatcher

@OptionalString public String getId ()

The restriction ID can be any string. For a branch this could be a fully qualified ref, for example 'refs/heads/master'.

Returns
  • the ID of the RefMatcher

@Nonnull public RefMatcherType getType ()

Returns
  • the RefMatcher's type

public boolean isActive ()

A RefMatcher can be inactive. An example of an inactive RefMatcher is a branch that has been deleted. The RefMatcher can still persist, even if the actual underlying object does not exist (temporarily or permanently).

Returns
  • true if the RefMatcher is active, false otherwise

public boolean matches (MinimalRef ref)

Determines whether or not a given MinimalRef matches the RefMatcher.

Parameters
ref The MinimalRef to check
Returns
  • true if the given ref matches this RefMatcher, false otherwise