public class

DefaultPermissionContextFactory

extends Object
implements PermissionContextFactory
java.lang.Object
   ↳ com.atlassian.jira.permission.DefaultPermissionContextFactory

Summary

Public Constructors
DefaultPermissionContextFactory(WorkflowManager workflowManager)
Public Methods
PermissionContext getPermissionContext(Project project)
Get the permission context for the given project.
PermissionContext getPermissionContext(Issue issue, ActionDescriptor actionDescriptor)
Get the permission context for the given issue at the end of the given workflow action.
PermissionContext getPermissionContext(OperationContext operationContext, Issue issue)
Checks if we're in a workflow operation, and if so constructs a PermissionContext with the destination status.
PermissionContext getPermissionContext(Issue issue, Status issueStatus)
Get the permission context for the given issue if it was in the given status.
PermissionContext getPermissionContext(GenericValue projectOrIssue)
PermissionContext getPermissionContext(Issue issue)
Get the permission context for the given issue.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.permission.PermissionContextFactory

Public Constructors

public DefaultPermissionContextFactory (WorkflowManager workflowManager)

Public Methods

public PermissionContext getPermissionContext (Project project)

Get the permission context for the given project.

Parameters
project The project for which the permission context is to be generated.
Returns
  • the context that should be used for permission checking.

public PermissionContext getPermissionContext (Issue issue, ActionDescriptor actionDescriptor)

Get the permission context for the given issue at the end of the given workflow action.

Parameters
issue The issue for which the permission context is to be generated.
actionDescriptor The workflow action that is occurring.
Returns
  • the context that should be used for permission checking.

public PermissionContext getPermissionContext (OperationContext operationContext, Issue issue)

Checks if we're in a workflow operation, and if so constructs a PermissionContext with the destination status. Otherwise returns a normal PC wrapping the issue.

public PermissionContext getPermissionContext (Issue issue, Status issueStatus)

Get the permission context for the given issue if it was in the given status.

Parameters
issue The issue for which the permission context is to be generated.
issueStatus The status that we pretend the issue is in for checking permissions.
Returns
  • the context that should be used for permission checking.

public PermissionContext getPermissionContext (GenericValue projectOrIssue)

public PermissionContext getPermissionContext (Issue issue)

Get the permission context for the given issue.

Parameters
issue The issue for which the permission context is to be generated.
Returns
  • the context that should be used for permission checking.