Class BasePermissionCondition
- java.lang.Object
-
- com.atlassian.confluence.plugin.descriptor.web.conditions.BaseConfluenceCondition
-
- com.atlassian.confluence.plugin.descriptor.web.conditions.BasePermissionCondition
-
- All Implemented Interfaces:
com.atlassian.plugin.web.baseconditions.BaseCondition
,com.atlassian.plugin.web.Condition
- Direct Known Subclasses:
AttachmentPermissionCondition
,CommentPermissionCondition
,HasViewProfilePermission
,PagePermissionCondition
,SpacePermissionCondition
public abstract class BasePermissionCondition extends BaseConfluenceCondition
Base class for conditions which check a permission on an object. The permission should be specified as a "permission" parameter in the plugin XML file. The object should be returned by implementinggetPermissionTarget(WebInterfaceContext)
.- Since:
- 2.8
-
-
Field Summary
Fields Modifier and Type Field Description protected Permission
permission
protected PermissionManager
permissionManager
-
Fields inherited from class com.atlassian.confluence.plugin.descriptor.web.conditions.BaseConfluenceCondition
CONTEXT_KEY_HELPER
-
-
Constructor Summary
Constructors Constructor Description BasePermissionCondition()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Object
getPermissionTarget(WebInterfaceContext context)
void
init(Map<String,String> params)
void
setPermissionManager(PermissionManager permissionManager)
boolean
shouldDisplay(WebInterfaceContext context)
-
Methods inherited from class com.atlassian.confluence.plugin.descriptor.web.conditions.BaseConfluenceCondition
shouldDisplay
-
-
-
-
Field Detail
-
permissionManager
protected PermissionManager permissionManager
-
permission
protected Permission permission
-
-
Method Detail
-
init
public void init(Map<String,String> params) throws com.atlassian.plugin.PluginParseException
- Specified by:
init
in interfacecom.atlassian.plugin.web.Condition
- Overrides:
init
in classBaseConfluenceCondition
- Throws:
com.atlassian.plugin.PluginParseException
-
shouldDisplay
public boolean shouldDisplay(WebInterfaceContext context)
- Specified by:
shouldDisplay
in classBaseConfluenceCondition
-
getPermissionTarget
protected abstract Object getPermissionTarget(WebInterfaceContext context)
-
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
-
-