@PublicApi public class

Visibilities

extends Object
java.lang.Object
   ↳ com.atlassian.jira.bc.issue.visibility.Visibilities

@PublicApi

This class is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Static factory methods to create Visibility instances. Methods which create a Visibility from a given groupLevel and roleLevelId or from a VisibilityJsonBean could return an InvalidVisibility when passed arguments was incorrect.

Summary

Public Methods
static Visibility fromGroupAndRoleId(String groupLevel, Long roleLevelId)
Create a visibility level for a specified group or role.
static Visibility fromGroupAndStrRoleId(String groupLevel, String roleLevelId)
Create a visibility level for a specified group or role.
static Visibility fromGroupAndStrRoleId(boolean levelPresent, String groupLevel, String roleLevelId)
static Visibility fromVisibilityBean(VisibilityJsonBean visibilityBean, ProjectRoleManager projectRoleManager)
Create a visibility level from VisibilityJsonBean
static Visibility groupVisibility(String groupLevel)
static Visibility publicVisibility()
static Visibility roleVisibility(long roleId)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Visibility fromGroupAndRoleId (String groupLevel, Long roleLevelId)

Create a visibility level for a specified group or role.

Parameters
groupLevel contains a name of the group which members can view an element with this visibility.
roleLevelId contains an id of project role which members can view an element with this visibility.
Returns

public static Visibility fromGroupAndStrRoleId (String groupLevel, String roleLevelId)

Create a visibility level for a specified group or role.

Parameters
groupLevel contains a name of the group which members can view an element with this visibility.
roleLevelId contains an string representation of id of project role which members can view an element with this visibility.
Returns

public static Visibility fromGroupAndStrRoleId (boolean levelPresent, String groupLevel, String roleLevelId)

public static Visibility fromVisibilityBean (VisibilityJsonBean visibilityBean, ProjectRoleManager projectRoleManager)

Create a visibility level from VisibilityJsonBean

Parameters
visibilityBean is a base to create the Visibility.
projectRoleManager is used to retrieve an id of role from its name.
Returns
  • a visibility based on the visibility bean. An InvalidVisibility may be returned if a role from the visibilityBean don't exist.

public static Visibility groupVisibility (String groupLevel)

public static Visibility publicVisibility ()

public static Visibility roleVisibility (long roleId)