com.atlassian.jira.workflow.validator
Class PermissionValidator

java.lang.Object
  extended by com.atlassian.jira.workflow.validator.AbstractPermissionValidator
      extended by com.atlassian.jira.workflow.validator.PermissionValidator
All Implemented Interfaces:
com.opensymphony.workflow.Validator
Direct Known Subclasses:
NotNullPermissionValidator

public class PermissionValidator
extends AbstractPermissionValidator
implements com.opensymphony.workflow.Validator

An OSWorkflow validator that validates a given permission is correct. Sample usage:

 <validator type="class">
 <arg name="class.name">com.atlassian.jira.workflow.validator.PermissionValidator</arg>
 <arg name="permission">Create Issue</arg>
 <!-- Optionally force constant username: <arg name="username">joe</arg> -->
 </validator>
 


Constructor Summary
PermissionValidator()
           
 
Method Summary
static com.opensymphony.workflow.loader.ValidatorDescriptor makeDescriptor(String permission)
           
 void validate(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)
           
 
Methods inherited from class com.atlassian.jira.workflow.validator.AbstractPermissionValidator
hasUserPermission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionValidator

public PermissionValidator()
Method Detail

makeDescriptor

public static com.opensymphony.workflow.loader.ValidatorDescriptor makeDescriptor(String permission)

validate

public void validate(Map transientVars,
                     Map args,
                     com.opensymphony.module.propertyset.PropertySet ps)
              throws com.opensymphony.workflow.InvalidInputException
Specified by:
validate in interface com.opensymphony.workflow.Validator
Throws:
com.opensymphony.workflow.InvalidInputException


Copyright © 2002-2008 Atlassian. All Rights Reserved.