public class

IsPersonalProjectCondition

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

Class Overview

A condition for testing whether a project is personal.

By default, any personal project will match this condition. Setting the onlyMine parameter to true restricts the condition to only return true if the project is the current user's PersonalProject personal project.

Summary

Constants
String ONLY_MINE
String PROJECT
Public Constructors
IsPersonalProjectCondition(AuthenticationContext authenticationContext)
Public Methods
void init(Map<StringString> params)
Parses parameters for this condition.
boolean shouldDisplay(Map<StringObject> context)
Retrieves a flag indicating whether the project, which is expected to be present in the provided context under the key "project", is a personal project.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Constants

public static final String ONLY_MINE

Constant Value: "onlyMine"

public static final String PROJECT

Constant Value: "project"

Public Constructors

public IsPersonalProjectCondition (AuthenticationContext authenticationContext)

Public Methods

public void init (Map<StringString> params)

Parses parameters for this condition. Supported parameters are:

  • onlyMine: true if the condition should only match the current user's personal project; false if all personal project should match (Default: false)

Parameters
params configuration parameters for this condition

public boolean shouldDisplay (Map<StringObject> context)

Retrieves a flag indicating whether the project, which is expected to be present in the provided context under the key "project", is a personal project.

If onlyMine is set to true, project must not only be personal but must belong to the current user.

Parameters
context the context containing the project
Returns
  • true if the project is personal (optionally further restricted to only the current user); otherwise, false