com.atlassian.jira.security.type
Class GroupCF

java.lang.Object
  extended bycom.atlassian.jira.security.type.AbstractSecurityType
      extended bycom.atlassian.jira.security.type.AbstractIssueFieldSecurityType
          extended bycom.atlassian.jira.security.type.GroupCF
All Implemented Interfaces:
SchemeType, SecurityType

public class GroupCF
extends AbstractIssueFieldSecurityType

Permission type for a Group Selector custom field, or select-list custom fields which specify groups.

Since:
3.6

Constructor Summary
GroupCF(JiraAuthenticationContext jiraAuthenticationContext, GroupSelectorUtils groupSelectorUtils)
           
 
Method Summary
 boolean doValidation(String key, Map parameters)
           
 String getArgumentDisplay(String argument)
           
 List getDisplayFields()
           
 String getDisplayName()
           
protected  String getField()
           
protected  String getFieldName()
           
 org.apache.lucene.search.Query getQuery(User searcher, org.ofbiz.core.entity.GenericValue entity, String parameter)
           
protected  org.apache.lucene.search.BooleanQuery getQueryForProject(org.ofbiz.core.entity.GenericValue project, User searcher)
          Gets called to produce the Lucene query for a project
protected  org.apache.lucene.search.BooleanQuery getQueryForSecurityLevel(org.ofbiz.core.entity.GenericValue issueSecurity, User searcher)
          Gets called to produce a Lucene query for a given issue security type
 String getType()
           
 Set getUsers(PermissionContext ctx, String customFieldId)
          Get user specified by the Custom Field
protected  boolean hasIssuePermission(User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue entity, String parameter)
           
protected  boolean hasProjectPermission(User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue project)
           
 
Methods inherited from class com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
hasPermission, hasPermission
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupCF

public GroupCF(JiraAuthenticationContext jiraAuthenticationContext,
               GroupSelectorUtils groupSelectorUtils)
Method Detail

getDisplayName

public String getDisplayName()

getType

public String getType()

getQuery

public org.apache.lucene.search.Query getQuery(User searcher,
                                               org.ofbiz.core.entity.GenericValue entity,
                                               String parameter)
Specified by:
getQuery in interface SecurityType
Overrides:
getQuery in class AbstractIssueFieldSecurityType

getQueryForProject

protected org.apache.lucene.search.BooleanQuery getQueryForProject(org.ofbiz.core.entity.GenericValue project,
                                                                   User searcher)
Description copied from class: AbstractIssueFieldSecurityType
Gets called to produce the Lucene query for a project

Overrides:
getQueryForProject in class AbstractIssueFieldSecurityType

getQueryForSecurityLevel

protected org.apache.lucene.search.BooleanQuery getQueryForSecurityLevel(org.ofbiz.core.entity.GenericValue issueSecurity,
                                                                         User searcher)
Description copied from class: AbstractIssueFieldSecurityType
Gets called to produce a Lucene query for a given issue security type

Overrides:
getQueryForSecurityLevel in class AbstractIssueFieldSecurityType

doValidation

public boolean doValidation(String key,
                            Map parameters)

getFieldName

protected String getFieldName()
Specified by:
getFieldName in class AbstractIssueFieldSecurityType

hasProjectPermission

protected boolean hasProjectPermission(User user,
                                       boolean issueCreation,
                                       org.ofbiz.core.entity.GenericValue project)
Specified by:
hasProjectPermission in class AbstractIssueFieldSecurityType

hasIssuePermission

protected boolean hasIssuePermission(User user,
                                     boolean issueCreation,
                                     org.ofbiz.core.entity.GenericValue entity,
                                     String parameter)
Overrides:
hasIssuePermission in class AbstractIssueFieldSecurityType

getField

protected String getField()
Specified by:
getField in class AbstractIssueFieldSecurityType

getDisplayFields

public List getDisplayFields()

getArgumentDisplay

public String getArgumentDisplay(String argument)
Specified by:
getArgumentDisplay in interface SecurityType
Overrides:
getArgumentDisplay in class AbstractSecurityType

getUsers

public Set getUsers(PermissionContext ctx,
                    String customFieldId)
Get user specified by the Custom Field

Specified by:
getUsers in interface SecurityType
Overrides:
getUsers in class AbstractIssueFieldSecurityType
Parameters:
customFieldId - eg. 'customfield_10000'


Copyright © 2002-2006 Atlassian. All Rights Reserved.