|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.security.type.AbstractSecurityType
com.atlassian.jira.security.type.AbstractProjectsSecurityType
com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType
public class ProjectRoleSecurityAndNotificationType
Field Summary | |
---|---|
static String |
PROJECT_ROLE
|
Constructor Summary | |
---|---|
ProjectRoleSecurityAndNotificationType(JiraAuthenticationContext jiraAuthenticationContext,
ProjectRoleManager projectRoleManager,
ProjectFactory projectFactory)
|
Method Summary | |
---|---|
boolean |
doValidation(String key,
Map parameters)
Validate the configuration (the argument in NotificationType.getRecipients(com.atlassian.jira.event.issue.IssueEvent, String) )
when it is entered in the "Add Notification" page. |
void |
doValidation(String key,
Map parameters,
JiraServiceContext jiraServiceContext)
|
String |
getArgumentDisplay(String roleTypeId)
Displays the type's configuration in the notification scheme. |
String |
getDisplayName()
Text to display for this type, on the "Add Notification" page. |
Collection |
getProjectRoles()
|
org.apache.lucene.search.Query |
getQuery(com.atlassian.crowd.embedded.api.User searcher,
Project project,
org.ofbiz.core.entity.GenericValue securityLevel,
String parameter)
Returns a query based on security level and the project passed in. |
List |
getRecipients(IssueEvent event,
String roleId)
Who is to be notified of an event. |
String |
getType()
Type identifier (currently unused). |
Set<com.atlassian.crowd.embedded.api.User> |
getUsers(PermissionContext permissionContext,
String roleId)
Returns a list of User s represented by a security type instance. |
protected Set |
getUsersFromRole(Project project,
String roleId)
Get all the users that satisfy this particular role. |
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,
com.atlassian.crowd.embedded.api.User user,
boolean issueCreation)
Interface for determining if a permission type has the permission |
Methods inherited from class com.atlassian.jira.security.type.AbstractProjectsSecurityType |
---|
getQuery |
Methods inherited from class com.atlassian.jira.security.type.AbstractSecurityType |
---|
isValidForPermission |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.security.type.SecurityType |
---|
getQuery |
Methods inherited from interface com.atlassian.jira.scheme.SchemeType |
---|
isValidForPermission |
Field Detail |
---|
public static final String PROJECT_ROLE
Constructor Detail |
---|
public ProjectRoleSecurityAndNotificationType(JiraAuthenticationContext jiraAuthenticationContext, ProjectRoleManager projectRoleManager, ProjectFactory projectFactory)
Method Detail |
---|
public org.apache.lucene.search.Query getQuery(com.atlassian.crowd.embedded.api.User searcher, Project project, org.ofbiz.core.entity.GenericValue securityLevel, String parameter)
SecurityType
getQuery
in interface SecurityType
getQuery
in class AbstractProjectsSecurityType
searcher
- The searcher conducting the searchproject
- The project for which we're constructing a querysecurityLevel
- The security level for which we are constructing the queryparameter
- Parameter identifying user related field (reporter, assignee, etc)
public Collection getProjectRoles()
public String getDisplayName()
NotificationType
getDisplayName
in interface NotificationType
getDisplayName
in interface SchemeType
public String getType()
NotificationType
getType
in interface NotificationType
getType
in interface SchemeType
public void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
doValidation
in interface SchemeType
public boolean doValidation(String key, Map parameters)
NotificationType
NotificationType.getRecipients(com.atlassian.jira.event.issue.IssueEvent, String)
)
when it is entered in the "Add Notification" page.
For instance, a group notification type might check if the entered group exists.
doValidation
in interface NotificationType
key
- Key of relevant value in parametersparameters
- HTML form parameters (only the keyed entry is relevant).
public String getArgumentDisplay(String roleTypeId)
NotificationType
getArgumentDisplay
in interface NotificationType
getArgumentDisplay
in interface SecurityType
getArgumentDisplay
in class AbstractSecurityType
roleTypeId
- Raw configuration value
public Set<com.atlassian.crowd.embedded.api.User> getUsers(PermissionContext permissionContext, String roleId)
SecurityType
User
s represented by a security type instance. The collection must
not contain any nulls.
getUsers
in interface SecurityType
permissionContext
- The current issue and projectroleId
- Instance value, eg. a group name, user name, custom field id
User
s.public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument)
SchemeType
hasPermission
in interface SchemeType
entity
- This is the issue or the project that the security is being checked forargument
- If this particular SchemeType has been configured with a parameter, then this parameter is passed (eg. Group Name for GroupDropdown
)
public boolean hasPermission(org.ofbiz.core.entity.GenericValue entity, String argument, com.atlassian.crowd.embedded.api.User user, boolean issueCreation)
SchemeType
hasPermission
in interface SchemeType
entity
- This is the issue or the project that the security is being checked forargument
- 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 checkedissueCreation
- Whether this permission is being checked during issue creation
public List getRecipients(IssueEvent event, String roleId)
NotificationType
getRecipients
in interface NotificationType
event
- The event, eg. issue createdroleId
- Configuration from notification scheme, eg. group name, custom field id.
NotificationRecipient
s.protected Set getUsersFromRole(Project project, String roleId)
project
- the project you to find want users forroleId
- the specific role you want to find users for
User
objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |