Class FieldScreenOperationContext

java.lang.Object
com.atlassian.jira.bc.issue.fields.screen.FieldScreenOperationContext

@ExperimentalApi public class FieldScreenOperationContext extends Object
A representation of a context in which current screen operation is being executed. It always consists of user and optionally may also involve project.
Since:
v7.4
  • Method Details

    • getUser

      public ApplicationUser getUser()
      Returns:
      a user performing operation
    • getProject

      public Optional<Project> getProject()
      Returns:
      a project in which context operation is being performed. may be empty
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • ofUserAndProject

      public static FieldScreenOperationContext ofUserAndProject(@Nullable ApplicationUser user, @Nullable Project project)
      Creates user and project context.
      Parameters:
      user - a user performing operation
      project - a project in which context operation is being performed
      Returns:
    • ofUser

      public static FieldScreenOperationContext ofUser(@Nullable ApplicationUser user)
      Creates new user-only context. Project is not present
      Parameters:
      user - user performing operation
      Returns:
      a new context