com.atlassian.jira.permission
Class WorkflowPermissionFactory

java.lang.Object
  extended by com.atlassian.jira.permission.WorkflowPermissionFactory

public class WorkflowPermissionFactory
extends Object


Field Summary
static String PREFIX
           
static String PREFIX_PARENT
           
 
Constructor Summary
WorkflowPermissionFactory(PermissionTypeManager permTypeManager)
           
 
Method Summary
 WorkflowPermission createWorkflowPermission(int relevantPermission, boolean isParent, String metaKey, String metaValue)
          Create a DefaultWorkflowPermission from a meta attribute key:value pair if it grants a certain permission
 List getWorkflowPermissions(PermissionContext ctx, int permissionId, boolean isParent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

public static final String PREFIX
See Also:
Constant Field Values

PREFIX_PARENT

public static final String PREFIX_PARENT
See Also:
Constant Field Values
Constructor Detail

WorkflowPermissionFactory

public WorkflowPermissionFactory(PermissionTypeManager permTypeManager)
Method Detail

getWorkflowPermissions

public List getWorkflowPermissions(PermissionContext ctx,
                                   int permissionId,
                                   boolean isParent)

createWorkflowPermission

public final WorkflowPermission createWorkflowPermission(int relevantPermission,
                                                         boolean isParent,
                                                         String metaKey,
                                                         String metaValue)
Create a DefaultWorkflowPermission from a meta attribute key:value pair if it grants a certain permission

Parameters:
relevantPermission - Permission we're interested in
isParent -
metaKey - Key, eg. 'jira.permission.comment.group'
metaValue - Value, eg. 'jira-users'
Returns:
A DefaultWorkflowPermission, or null if the meta key doesn't match relevantPermission.
Throws:
IllegalArgumentException - If metaKey does not correctly specify a permission.


Copyright © 2002-2009 Atlassian. All Rights Reserved.