public class

HasPersonalForkCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.HasPersonalForkCondition

Class Overview

A condition for detecting whether the current user has a personal fork for a given repository.

Note: Unlike IsPersonalProjectCondition and IsPersonalRepositoryCondition, this condition always checks whether the current user has a personal fork of the repository and there is no mode to include forks from other users.

Summary

Constants
String REPOSITORY
Public Constructors
HasPersonalForkCondition(RepositoryService repositoryService)
Public Methods
void init(Map<StringString> params)
Ignored, as this condition does not support any parameters for controlling its behaviour.
boolean shouldDisplay(Map<StringObject> context)
Retrieves a flag indicating whether the current user has a personal fork of the repository, which is expected to be present in the provided context under the key "repository".
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Constants

public static final String REPOSITORY

Constant Value: "repository"

Public Constructors

public HasPersonalForkCondition (RepositoryService repositoryService)

Public Methods

public void init (Map<StringString> params)

Ignored, as this condition does not support any parameters for controlling its behaviour.

Parameters
params ignored

public boolean shouldDisplay (Map<StringObject> context)

Retrieves a flag indicating whether the current user has a personal fork of the repository, which is expected to be present in the provided context under the key "repository".

Parameters
context the context containing the repository
Returns
  • true if the current user has a personal fork of the context repository; otherwise, false