public interface

VisibilityValidator

com.atlassian.jira.bc.issue.util.VisibilityValidator
Known Indirect Subclasses

Class Overview

This class is used to check the validity of group or role level visibility restrictions. Examples of where this is used are: Comment visibility and Worklog visibility restrictions.

Use this class to determine if group or project role restrictions are enabled, and to validate that input parameters that contain group or project role information would constitute a valid restriction.

Summary

Public Methods
boolean isGroupVisibilityEnabled()
Determines if group visibility restrictions are currently enabled in JIRA.
@Deprecated boolean isGroupVisiblityEnabled()
This method is deprecated. Use isGroupVisibilityEnabled(). Since 6.4
boolean isProjectRoleVisibilityEnabled()
Determines if project role visibility restrictions are currently enabled in JIRA.
@Deprecated boolean isProjectRoleVisiblityEnabled()
This method is deprecated. Use isProjectRoleVisibilityEnabled(). Since 6.4
@Deprecated boolean isValidVisibilityData(JiraServiceContext jiraServiceContext, String i18nPrefix, Issue issue, String groupLevel, String roleLevelId)
boolean isValidVisibilityData(JiraServiceContext jiraServiceContext, String i18nPrefix, Issue issue, Visibility visibility)
This will validate that the passed in group level and project role level id will constitute a valid visibility restriction.

Public Methods

public boolean isGroupVisibilityEnabled ()

Determines if group visibility restrictions are currently enabled in JIRA.

Returns
  • true if enabled, false otherwise.

@Deprecated public boolean isGroupVisiblityEnabled ()

This method is deprecated.
Use isGroupVisibilityEnabled(). Since 6.4

Determines if group visibility restrictions are currently enabled in JIRA.

Returns
  • true if enabled, false otherwise.

public boolean isProjectRoleVisibilityEnabled ()

Determines if project role visibility restrictions are currently enabled in JIRA.

Returns
  • true if enabled, false otherwise.

@Deprecated public boolean isProjectRoleVisiblityEnabled ()

This method is deprecated.
Use isProjectRoleVisibilityEnabled(). Since 6.4

Determines if project role visibility restrictions are currently enabled in JIRA.

Returns
  • true if enabled, false otherwise.

@Deprecated public boolean isValidVisibilityData (JiraServiceContext jiraServiceContext, String i18nPrefix, Issue issue, String groupLevel, String roleLevelId)

This method is deprecated.
Use isValidVisibilityData(com.atlassian.jira.bc.JiraServiceContext, String, com.atlassian.jira.issue.Issue, com.atlassian.jira.bc.issue.visibility.Visibility). Since 6.4

This will validate that the passed in group level and project role level id will constitute a valid visibility restriction. You can not specify both a group and role level. The group or role must exist in JIRA and the user performing this operation must be a member of the group or role. All errors will be added in human-readable form via the I18N key prefixed with the passed in prefix.

Parameters
jiraServiceContext containing the user who wishes to apply the restriction and the errorCollection
i18nPrefix the prefix for the I18N messages that will be added to the error collection.
issue the Issue you wish to associate the element that will be restricted with. This can not be null.
groupLevel the group level visibility of the comment (null if roleLevelId specified)
roleLevelId the role level visibility id of the comment (null if groupLevel specified)
Returns
  • true if the visibility data is valid, false otherwise.

public boolean isValidVisibilityData (JiraServiceContext jiraServiceContext, String i18nPrefix, Issue issue, Visibility visibility)

This will validate that the passed in group level and project role level id will constitute a valid visibility restriction. You can not specify both a group and role level. The group or role must exist in JIRA and the user performing this operation must be a member of the group or role. All errors will be added in human-readable form via the I18N key prefixed with the passed in prefix.

Parameters
jiraServiceContext containing the user who wishes to apply the restriction and the errorCollection
i18nPrefix the prefix for the I18N messages that will be added to the error collection.
issue the Issue you wish to associate the element that will be restricted with. This can not be null.
visibility defines visibility of the comment
Returns
  • true if the visibility data is valid, false otherwise.