com.atlassian.jira.scheme
Interface SchemeType

All Known Subinterfaces:
SecurityType
All Known Implementing Classes:
AbstractIssueFieldSecurityType, AbstractProjectsSecurityType, AbstractSecurityType, CurrentAssignee, CurrentAssigneeHasAssignablePermission, CurrentReporter, CurrentReporterHasCreatePermission, GroupCF, GroupDropdown, ProjectLead, ProjectRoleSecurityAndNotificationType, SingleUser, UserCF

public interface SchemeType


Method Summary
 void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
           
 String getDisplayName()
           
 String getType()
           
 boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument)
          Interface for determining if a permission type has the permission.
 boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument, User user, boolean issueCreation)
          Interface for determining if a permission type has the permission
 boolean isValidForPermission(int permissionId)
          This method determines if this SchemeType is valid for the given permissionId.
 

Method Detail

getDisplayName

String getDisplayName()

getType

String getType()

doValidation

void doValidation(String key,
                  Map parameters,
                  JiraServiceContext jiraServiceContext)

hasPermission

boolean hasPermission(org.ofbiz.core.entity.GenericValue entity,
                      String argument)
Interface for determining if a permission type has the permission.

This method is called if there is no Remote User (ie anonymous)

Parameters:
entity - This is the issue or the project that the security is being checked for
argument - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
Returns:
true if anonymous Users have this permission.

hasPermission

boolean hasPermission(org.ofbiz.core.entity.GenericValue entity,
                      String argument,
                      User user,
                      boolean issueCreation)
Interface for determining if a permission type has the permission

Parameters:
entity - This is the issue or the project that the security is being checked for
argument - If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown)
user - The user for whom the permission is being checked
issueCreation - Whether this permission is being checked during issue creation
Returns:
true if the given User has this permission.

isValidForPermission

boolean isValidForPermission(int permissionId)
This method determines if this SchemeType is valid for the given permissionId.

The default behaviour is for SchemeTypes to be valid for all permission functions, but some scheme types may choose to override this behaviour. eg the CurrentReporterHasCreatePermission scheme is invalid to be added to the "Create Issue" function. Also see JRA-13315.

Parameters:
permissionId - ID of the permission in question
Returns:
true if this SchemeType is valid for the given permissionId.
See Also:
CurrentReporterHasCreatePermission


Copyright © 2002-2009 Atlassian. All Rights Reserved.