com.atlassian.jira.plugin.webfragment.conditions
Class AbstractJiraPermissionCondition

java.lang.Object
  extended by com.atlassian.jira.plugin.webfragment.conditions.AbstractJiraCondition
      extended by com.atlassian.jira.plugin.webfragment.conditions.AbstractJiraPermissionCondition
All Implemented Interfaces:
com.atlassian.plugin.web.Condition
Direct Known Subclasses:
HasIssuePermissionCondition, HasProjectPermissionCondition, JiraGlobalPermissionCondition, UserHasVisibleProjectsCondition

public abstract class AbstractJiraPermissionCondition
extends AbstractJiraCondition

Convenient abstraction to initialise conditions that require the PermissionManager and accept "permission" param.

The permission param is converted using Permissions.getType(String) and its value is set in permission


Field Summary
protected  int permission
           
protected  PermissionManager permissionManager
           
 
Constructor Summary
AbstractJiraPermissionCondition(PermissionManager permissionManager)
           
 
Method Summary
 void init(java.util.Map params)
           
abstract  boolean shouldDisplay(com.opensymphony.user.User user, JiraHelper jiraHelper)
           
 
Methods inherited from class com.atlassian.jira.plugin.webfragment.conditions.AbstractJiraCondition
shouldDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

permissionManager

protected PermissionManager permissionManager

permission

protected int permission
Constructor Detail

AbstractJiraPermissionCondition

public AbstractJiraPermissionCondition(PermissionManager permissionManager)
Method Detail

init

public void init(java.util.Map params)
          throws com.atlassian.plugin.PluginParseException
Specified by:
init in interface com.atlassian.plugin.web.Condition
Overrides:
init in class AbstractJiraCondition
Throws:
com.atlassian.plugin.PluginParseException

shouldDisplay

public abstract boolean shouldDisplay(com.opensymphony.user.User user,
                                      JiraHelper jiraHelper)
Specified by:
shouldDisplay in class AbstractJiraCondition


Copyright © 2002-2010 Atlassian. All Rights Reserved.