com.atlassian.jira.security.type
Interface SecurityType

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

public interface SecurityType
extends SchemeType


Method Summary
 java.lang.String getArgumentDisplay(java.lang.String argument)
           
 org.apache.lucene.search.Query getQuery(com.opensymphony.user.User searcher, org.ofbiz.core.entity.GenericValue entity, java.lang.String parameter)
           
 org.apache.lucene.search.Query getQuery(com.opensymphony.user.User searcher, Project project, org.ofbiz.core.entity.GenericValue securityLevel, java.lang.String parameter)
          Returns a query based on security level and the project passed in.
 java.util.Set<com.opensymphony.user.User> getUsers(PermissionContext permissionContext, java.lang.String argument)
          Returns a list of Users represented by a security type instance.
 
Methods inherited from interface com.atlassian.jira.scheme.SchemeType
doValidation, getDisplayName, getType, hasPermission, hasPermission, isValidForPermission
 

Method Detail

getQuery

org.apache.lucene.search.Query getQuery(com.opensymphony.user.User searcher,
                                        org.ofbiz.core.entity.GenericValue entity,
                                        java.lang.String parameter)

getQuery

org.apache.lucene.search.Query getQuery(com.opensymphony.user.User searcher,
                                        Project project,
                                        org.ofbiz.core.entity.GenericValue securityLevel,
                                        java.lang.String parameter)
Returns a query based on security level and the project passed in. This may be required in particular for role based issue security levels. (see JRA-12739)

Parameters:
searcher - The searcher conducting the search
project - The project for which we're constructing a query
securityLevel - The security level for which we are constructing the query
parameter - Parameter identifying user related field (reporter, assignee, etc)
Returns:
A lucene permissions query

getArgumentDisplay

java.lang.String getArgumentDisplay(java.lang.String argument)

getUsers

java.util.Set<com.opensymphony.user.User> getUsers(PermissionContext permissionContext,
                                                   java.lang.String argument)
Returns a list of Users represented by a security type instance. The collection must not contain any nulls.

Parameters:
permissionContext - The current issue and project
argument - Instance value, eg. a group name, user name, custom field id
Returns:
A set of Users.
Throws:
java.lang.IllegalArgumentException - if argument is invalid for this type.


Copyright © 2002-2010 Atlassian. All Rights Reserved.