public class

VisibilityVisitors

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

Class Overview

Static factory methods to create VisibilityVisitor which return groupLevel or roleLevelId from given Visibility or validate it.

Summary

Public Methods
static VisibilityVisitor<Option<String>> returningGroupLevelVisitor()
static VisibilityVisitor<Option<Long>> returningRoleLevelIdVisitor()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static VisibilityVisitor<Option<String>> returningGroupLevelVisitor ()

Returns
  • the visitor which returns roleId level restriction if the visibility is represent by RoleVisibility. In other way it returns Option.NONE. WARNING This visitor returns Option.NONE for invalid visibility too, so if you want to transform empty option to null and then pass it to worklog or comment you have to validate this visibility first. If you don't valid it, the invalid visibility make this comment or worklog public.

public static VisibilityVisitor<Option<Long>> returningRoleLevelIdVisitor ()

Returns
  • the visitor which returns group level restriction if the visibility is represent by GroupVisibility. In other way it returns Option.NONE. WARNING This visitor returns Option.NONE for invalid visibility too, so if you want to transform empty option to null and then pass it to worklog or comment you have to validate this visibility first. If you don't valid it, the invalid visibility make this comment or worklog public.