@PublicApi
public interface ProjectRoleService
Modifier and Type | Field and Description |
---|---|
static String |
PROJECTROLE_ISSUE_SECURITY_TYPE |
static String |
PROJECTROLE_NOTIFICATION_TYPE |
static String |
PROJECTROLE_PERMISSION_TYPE |
Modifier and Type | Method and Description |
---|---|
void |
addActorsToProjectRole(ApplicationUser currentUser,
Collection<String> actors,
ProjectRole projectRole,
Project project,
String actorType,
ErrorCollection errorCollection)
Deprecated.
Use
addActorsToProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will add project role actor associations for the given |
void |
addActorsToProjectRole(Collection<String> actors,
ProjectRole projectRole,
Project project,
String actorType,
ErrorCollection errorCollection) |
void |
addDefaultActorsToProjectRole(ApplicationUser currentUser,
Collection<String> actors,
ProjectRole projectRole,
String type,
ErrorCollection errorCollection)
Deprecated.
Use
addActorsToProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will add default role actor associations based off the passed in |
void |
addDefaultActorsToProjectRole(Collection<String> actors,
ProjectRole projectRole,
String type,
ErrorCollection errorCollection) |
ProjectRole |
createProjectRole(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
createProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will create the project role with the given |
ProjectRole |
createProjectRole(ProjectRole projectRole,
ErrorCollection errorCollection) |
void |
deleteProjectRole(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
deleteProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will delete the given |
void |
deleteProjectRole(ProjectRole projectRole,
ErrorCollection errorCollection) |
Collection |
getAssociatedIssueSecuritySchemes(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
getAssociatedIssueSecuritySchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will get all issue security scheme's that the specified projectRole is currently used in. |
Collection |
getAssociatedIssueSecuritySchemes(ProjectRole projectRole,
ErrorCollection errorCollection) |
Collection |
getAssociatedNotificationSchemes(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
getAssociatedNotificationSchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will get all notification scheme's that the specified projectRole is currently used in. |
Collection |
getAssociatedNotificationSchemes(ProjectRole projectRole,
ErrorCollection errorCollection) |
Collection |
getAssociatedPermissionSchemes(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
getAssociatedPermissionSchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will get all permission scheme's that the specified projectRole is currently used in. |
Collection |
getAssociatedPermissionSchemes(ProjectRole projectRole,
ErrorCollection errorCollection) |
org.apache.commons.collections.MultiMap |
getAssociatedWorkflows(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
getAssociatedWorkflows(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Returns workflows and their actions that are associated with the given
|
org.apache.commons.collections.MultiMap |
getAssociatedWorkflows(ProjectRole projectRole,
ErrorCollection errorCollection) |
DefaultRoleActors |
getDefaultRoleActors(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection collection)
Deprecated.
Use
getProjectRoleActors(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will return a |
DefaultRoleActors |
getDefaultRoleActors(ProjectRole projectRole,
ErrorCollection collection) |
Map<Long,List<String>> |
getProjectIdsForUserInGroupsBecauseOfRole(ApplicationUser currentUser,
List<Long> projectsToLimitBy,
ProjectRole projectRole,
String projectRoleType,
String userName,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectIdsForUserInGroupsBecauseOfRole(java.util.List, com.atlassian.jira.security.roles.ProjectRole, String, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Returns a Map of Lists. The key of the map is a Long, project id and the value of the map is a list of group names that the user is a member of for the project. This method is meant to provide an efficient means to discover which groups that are associated with a project role implicitly include the specified user in that project role. We allow you to specify a range of projectsToLimitBy so that you can perform only one query to find this information for many projects for a single projectRole. |
Map<Long,List<String>> |
getProjectIdsForUserInGroupsBecauseOfRole(List<Long> projectsToLimitBy,
ProjectRole projectRole,
String projectRoleType,
String userName,
ErrorCollection errorCollection) |
ProjectRole |
getProjectRole(ApplicationUser currentUser,
Long id,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectRole(Long, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will return the project role with the given |
ProjectRole |
getProjectRole(Long id,
ErrorCollection errorCollection) |
ProjectRoleActors |
getProjectRoleActors(ApplicationUser currentUser,
ProjectRole projectRole,
Project project,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectRoleActors(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will return a {@link ProjectRoleActors) for the given |
ProjectRoleActors |
getProjectRoleActors(ProjectRole projectRole,
Project project,
ErrorCollection errorCollection) |
ProjectRole |
getProjectRoleByName(ApplicationUser currentUser,
String name,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectRoleByName(String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will return the project role with the given name , and checking the currentUser
has the correct permissions to perform the operation.
The passed in errorCollection will contain any errors that are generated, such as permission violations. |
ProjectRole |
getProjectRoleByName(String name,
ErrorCollection errorCollection) |
Collection<ProjectRole> |
getProjectRoles(ApplicationUser currentUser,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectRoles(com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Get all the ProjectRoles available in JIRA. Currently this list is global. |
Collection<ProjectRole> |
getProjectRoles(ErrorCollection errorCollection) |
Collection<Project> |
getProjectsContainingRoleActorByNameAndType(ApplicationUser currentUser,
String name,
String type,
ErrorCollection errorCollection)
Deprecated.
Use
getProjectsContainingRoleActorByNameAndType(String, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Returns the |
Collection<Project> |
getProjectsContainingRoleActorByNameAndType(String name,
String type,
ErrorCollection errorCollection) |
boolean |
hasProjectRolePermission(ApplicationUser currentUser,
Project project)
Deprecated.
Use
#hasProjectRolePermission(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.project.Project) instead. Since v6.0.
Will have permission to modify roles if they are a JIRA admin or, if in enterprise, the user is a project administrator. |
boolean |
hasProjectRolePermission(Project project) |
boolean |
isProjectRoleNameUnique(ApplicationUser currentUser,
String name,
ErrorCollection errorCollection)
Deprecated.
Use
isProjectRoleNameUnique(String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will tell you if a role name exists or not. |
boolean |
isProjectRoleNameUnique(String name,
ErrorCollection errorCollection) |
void |
removeActorsFromProjectRole(ApplicationUser currentUser,
Collection<String> actors,
ProjectRole projectRole,
Project project,
String actorType,
ErrorCollection errorCollection)
Deprecated.
Use
removeActorsFromProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will remove project role actor associations for the given |
void |
removeActorsFromProjectRole(Collection<String> actors,
ProjectRole projectRole,
Project project,
String actorType,
ErrorCollection errorCollection) |
void |
removeAllRoleActorsByNameAndType(ApplicationUser currentUser,
String name,
String type,
ErrorCollection errorCollection)
Deprecated.
Use
removeAllRoleActorsByNameAndType(String, String, ErrorCollection) instead. Since v6.0.
Will remove all role actors with the specified name and the specified type. This method should be used to clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system). |
void |
removeAllRoleActorsByNameAndType(String name,
String type)
Deprecated.
Use
removeAllRoleActorsByNameAndType(String, String, com.atlassian.jira.util.ErrorCollection) (String, String)} instead. Since v6.0.
Will remove all role actors with the specified name and the specified type. This method should be used to clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system). |
void |
removeAllRoleActorsByNameAndType(String name,
String type,
ErrorCollection errorCollection) |
void |
removeAllRoleActorsByProject(ApplicationUser currentUser,
Project project,
ErrorCollection errorCollection)
Deprecated.
Use
removeAllRoleActorsByProject(com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will remove all role actors associated with the specified project. This method should be used
to clean up just before the actual project has been deleted (ex. deleting a project from the system). |
void |
removeAllRoleActorsByProject(Project project,
ErrorCollection errorCollection) |
void |
removeDefaultActorsFromProjectRole(ApplicationUser currentUser,
Collection<String> actors,
ProjectRole projectRole,
String actorType,
ErrorCollection errorCollection)
Deprecated.
Use
removeDefaultActorsFromProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will remove default actor associations based off the passed in |
void |
removeDefaultActorsFromProjectRole(Collection<String> actors,
ProjectRole projectRole,
String actorType,
ErrorCollection errorCollection) |
List<Long> |
roleActorOfTypeExistsForProjects(ApplicationUser currentUser,
List<Long> projectsToLimitBy,
ProjectRole projectRole,
String projectRoleType,
String projectRoleParameter,
ErrorCollection errorCollection)
Deprecated.
Use
roleActorOfTypeExistsForProjects(java.util.List, com.atlassian.jira.security.roles.ProjectRole, String, String, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Returns a list of projectId's for which the role actor of the specified type exists in the project for the provided projectRole. This is a method that is meant to efficiently allow discovery of whether a UserRoleActor exists in a project role for a subset of projects. |
List<Long> |
roleActorOfTypeExistsForProjects(List<Long> projectsToLimitBy,
ProjectRole projectRole,
String projectRoleType,
String projectRoleParameter,
ErrorCollection errorCollection) |
void |
setActorsForProjectRole(ApplicationUser currentUser,
Map<String,Set<String>> newRoleActors,
ProjectRole projectRole,
Project project,
ErrorCollection errorCollection)
Deprecated.
Use
setActorsForProjectRole(java.util.Map, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will set the project role actor associations for the given |
void |
setActorsForProjectRole(Map<String,Set<String>> newRoleActors,
ProjectRole projectRole,
Project project,
ErrorCollection errorCollection) |
void |
swapRole(ProjectRole role,
ProjectRole swapRole)
Swaps a role in scheme entities, workflows, comments and worklogs for a replacement role.
|
void |
updateProjectRole(ApplicationUser currentUser,
ProjectRole projectRole,
ErrorCollection errorCollection)
Deprecated.
Use
updateProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection) instead. Since v6.0.
Will update projectRole , checking
the currentUser has the correct permissions to perform the update operation.
The passed in errorCollection will contain any errors that are generated, such as permission violations. |
void |
updateProjectRole(ProjectRole projectRole,
ErrorCollection errorCollection) |
ServiceResult |
validateNoRoleUsage(ProjectRole projectRole)
Checks if the given role is not used.
|
ErrorCollection |
validateRemoveAllRoleActorsByNameAndType(ApplicationUser currentUser,
String name,
String type)
Deprecated.
Use
removeAllRoleActorsByNameAndType(String, String) instead. Since v6.0.
Will validate removing all role actors with the specified name and the specified type. This method should be used before clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system). Validation error wil be reported when name does not exists, type does not exists or user performing validation does not have administrative rights |
ErrorCollection |
validateRemoveAllRoleActorsByNameAndType(String name,
String type) |
static final String PROJECTROLE_ISSUE_SECURITY_TYPE
static final String PROJECTROLE_PERMISSION_TYPE
static final String PROJECTROLE_NOTIFICATION_TYPE
Collection<ProjectRole> getProjectRoles(ErrorCollection errorCollection)
Collection<ProjectRole> getProjectRoles(ApplicationUser currentUser, ErrorCollection errorCollection)
getProjectRoles(com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Get all the ProjectRoles available in JIRA. Currently this list is global.
ProjectRole getProjectRole(Long id, ErrorCollection errorCollection)
ProjectRole getProjectRole(ApplicationUser currentUser, Long id, ErrorCollection errorCollection)
getProjectRole(Long, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will return the project role with the given id
, and checking the currentUser
has the correct permissions to perform the operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callid
- the id of the ProjectRoleerrorCollection
- will contain any errors in calling the methodProjectRole getProjectRoleByName(String name, ErrorCollection errorCollection)
ProjectRole getProjectRoleByName(ApplicationUser currentUser, String name, ErrorCollection errorCollection)
getProjectRoleByName(String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will return the project role with the given name
, and checking the currentUser
has the correct permissions to perform the operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.currentUser
- the user performing the callname
- the name of the project role to returnerrorCollection
- will contain any errors in calling the methodProjectRole createProjectRole(ProjectRole projectRole, ErrorCollection errorCollection)
ProjectRole createProjectRole(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
createProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will create the project role with the given projectRole.getName()
,
projectRole.getDescription()
and checking the currentUser
has the correct permissions
to perform the create operation. The passed in errorCollection
will contain any errors that are
generated, such as permission violations.
currentUser
- the user performing the callprojectRole
- can not be null and will contain the name and description for the project role to createerrorCollection
- will contain any errors in calling the methodboolean isProjectRoleNameUnique(String name, ErrorCollection errorCollection)
boolean isProjectRoleNameUnique(ApplicationUser currentUser, String name, ErrorCollection errorCollection)
isProjectRoleNameUnique(String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will tell you if a role name exists or not.
name
- the name of the project role to checkvoid deleteProjectRole(ProjectRole projectRole, ErrorCollection errorCollection)
void deleteProjectRole(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
deleteProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will delete the given projectRole
and checks
the currentUser
has the correct permissions to perform the delete operation.
This will also delete all ProjectRoleActor associations that it is the parent of.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callprojectRole
- errorCollection
- will contain any errors in calling the methodvoid addActorsToProjectRole(Collection<String> actors, ProjectRole projectRole, Project project, String actorType, ErrorCollection errorCollection)
void addActorsToProjectRole(ApplicationUser currentUser, Collection<String> actors, ProjectRole projectRole, Project project, String actorType, ErrorCollection errorCollection)
addActorsToProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will add project role actor associations for the given actors
and checking
the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callactors
- is a list of strings (e.g. user keys or group names) that the RoleActor impl should be able to handleprojectRole
- is the project role to associate withproject
- is the project to associate withactorType
- is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodvoid removeActorsFromProjectRole(Collection<String> actors, ProjectRole projectRole, Project project, String actorType, ErrorCollection errorCollection)
void removeActorsFromProjectRole(ApplicationUser currentUser, Collection<String> actors, ProjectRole projectRole, Project project, String actorType, ErrorCollection errorCollection)
removeActorsFromProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will remove project role actor associations for the given actors
and checking
the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callactors
- is a list of strings (e.g. user keys or group names) that the RoleActor impl should be able to handleprojectRole
- is the project role to associate withproject
- is the project to associate withactorType
- is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodvoid setActorsForProjectRole(Map<String,Set<String>> newRoleActors, ProjectRole projectRole, Project project, ErrorCollection errorCollection)
void setActorsForProjectRole(ApplicationUser currentUser, Map<String,Set<String>> newRoleActors, ProjectRole projectRole, Project project, ErrorCollection errorCollection)
setActorsForProjectRole(java.util.Map, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will set the project role actor associations for the given newRoleActors
and checking
the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callnewRoleActors
- is a mapping of actor types to actor parameters that will be set for the project roleprojectRole
- is the project role to associate withproject
- is the project to associate witherrorCollection
- will contain any errors in calling the methodvoid updateProjectRole(ProjectRole projectRole, ErrorCollection errorCollection)
void updateProjectRole(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
updateProjectRole(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will update projectRole
, checking
the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.currentUser
- the user performing the callprojectRole
- errorCollection
- will contain any errors in calling the methodProjectRoleActors getProjectRoleActors(ProjectRole projectRole, Project project, ErrorCollection errorCollection)
ProjectRoleActors getProjectRoleActors(ApplicationUser currentUser, ProjectRole projectRole, Project project, ErrorCollection errorCollection)
getProjectRoleActors(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will return a {@link ProjectRoleActors) for the given projectRole
and project
checking
the currentUser
has the correct permissions to perform the get operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callprojectRole
- project
- errorCollection
- will contain any errors in calling the methodDefaultRoleActors getDefaultRoleActors(ProjectRole projectRole, ErrorCollection collection)
DefaultRoleActors getDefaultRoleActors(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection collection)
getProjectRoleActors(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will return a DefaultRoleActors
for the given projectRole
checking the currentUser
has the correct permissions to perform the get operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callprojectRole
- collection
- void addDefaultActorsToProjectRole(Collection<String> actors, ProjectRole projectRole, String type, ErrorCollection errorCollection)
void addDefaultActorsToProjectRole(ApplicationUser currentUser, Collection<String> actors, ProjectRole projectRole, String type, ErrorCollection errorCollection)
addActorsToProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.project.Project, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will add default role actor associations based off the passed in actors
and checking
the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callactors
- is a list of strings (e.g. user keys or group names) that the RoleActor impl should be able to handleprojectRole
- is the project role to associate withtype
- is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodvoid removeDefaultActorsFromProjectRole(Collection<String> actors, ProjectRole projectRole, String actorType, ErrorCollection errorCollection)
void removeDefaultActorsFromProjectRole(ApplicationUser currentUser, Collection<String> actors, ProjectRole projectRole, String actorType, ErrorCollection errorCollection)
removeDefaultActorsFromProjectRole(java.util.Collection, com.atlassian.jira.security.roles.ProjectRole, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will remove default actor associations based off the passed in actors
, projectRole
and
actorType
and checking the currentUser
has the correct permissions to perform the update operation.
The passed in errorCollection
will contain any errors that are generated, such as permission violations.
currentUser
- the user performing the callactors
- is a list of strings (e.g. user keys or group names) that the RoleActor impl should be able to handleprojectRole
- is the project role to associate withactorType
- is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodvoid removeAllRoleActorsByNameAndType(String name, String type, ErrorCollection errorCollection)
void removeAllRoleActorsByNameAndType(ApplicationUser currentUser, String name, String type, ErrorCollection errorCollection)
removeAllRoleActorsByNameAndType(String, String, ErrorCollection)
instead. Since v6.0.
Will remove all role actors with the specified name and the specified type. This method should be used to clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system).
currentUser
- the user performing the callname
- this is the name that the role actor is stored under (ex. username of 'admin', group name of
'jira-users')type
- this is the role type parameter, (ex. GroupRoleActor.TYPE, UserRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodErrorCollection validateRemoveAllRoleActorsByNameAndType(String name, String type)
ErrorCollection validateRemoveAllRoleActorsByNameAndType(ApplicationUser currentUser, String name, String type)
removeAllRoleActorsByNameAndType(String, String)
instead. Since v6.0.
Will validate removing all role actors with the specified name and the specified type. This method should be used before clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system). Validation error wil be reported when name does not exists, type does not exists or user performing validation does not have administrative rights
currentUser
- the user performing the callname
- this is the name that the role actor is stored under (ex. username of 'admin', group name of
'jira-users')type
- this is the role type parameter, (ex. GroupRoleActor.TYPE, UserRoleActor.TYPE)void removeAllRoleActorsByNameAndType(String name, String type)
removeAllRoleActorsByNameAndType(String, String, com.atlassian.jira.util.ErrorCollection)
(String, String)} instead. Since v6.0.
Will remove all role actors with the specified name and the specified type. This method should be used to clean up after the actual subject of the role actor has been deleted (ex. deleting a user from the system).
name
- this is the name that the role actor is stored under (ex. username of 'admin', group name of
'jira-users')type
- this is the role type parameter, (ex. GroupRoleActor.TYPE, UserRoleActor.TYPE)void removeAllRoleActorsByProject(Project project, ErrorCollection errorCollection)
void removeAllRoleActorsByProject(ApplicationUser currentUser, Project project, ErrorCollection errorCollection)
removeAllRoleActorsByProject(com.atlassian.jira.project.Project, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will remove all role actors associated with the specified project. This method should be used
to clean up just before the actual project has been deleted (ex. deleting a project from the system).currentUser
- the user performing the callproject
- errorCollection
- will contain any errors in calling the methodCollection getAssociatedNotificationSchemes(ProjectRole projectRole, ErrorCollection errorCollection)
Collection getAssociatedNotificationSchemes(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
getAssociatedNotificationSchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will get all notification scheme's that the specified projectRole is currently used in.
currentUser
- the user performing the callprojectRole
- errorCollection
- will contain any errors in calling the methodCollection getAssociatedPermissionSchemes(ProjectRole projectRole, ErrorCollection errorCollection)
Collection getAssociatedPermissionSchemes(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
getAssociatedPermissionSchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will get all permission scheme's that the specified projectRole is currently used in.currentUser
- the user performing the callprojectRole
- errorCollection
- will contain any errors in calling the methodCollection getAssociatedIssueSecuritySchemes(ProjectRole projectRole, ErrorCollection errorCollection)
Collection getAssociatedIssueSecuritySchemes(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
getAssociatedIssueSecuritySchemes(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Will get all issue security scheme's that the specified projectRole is currently used in.
currentUser
- the user performing the callprojectRole
- errorCollection
- will contain any errors in calling the methodorg.apache.commons.collections.MultiMap getAssociatedWorkflows(ProjectRole projectRole, ErrorCollection errorCollection)
org.apache.commons.collections.MultiMap getAssociatedWorkflows(ApplicationUser currentUser, ProjectRole projectRole, ErrorCollection errorCollection)
getAssociatedWorkflows(com.atlassian.jira.security.roles.ProjectRole, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Returns workflows and their actions that are associated with the given
ProjectRole
. e.g. com.atlassian.jira.workflow.condition.InProjectRoleCondition
workflow elements that block workflow transition unless the acting user is
in the ProjectRole.
currentUser
- the acting user.projectRole
- the project role.errorCollection
- will contain any errors in calling the methodCollection<Project> getProjectsContainingRoleActorByNameAndType(String name, String type, ErrorCollection errorCollection)
Collection<Project> getProjectsContainingRoleActorByNameAndType(ApplicationUser currentUser, String name, String type, ErrorCollection errorCollection)
getProjectsContainingRoleActorByNameAndType(String, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Returns the Project
's which contain a role actor of the specified name and type within any role. This is a method
that is provided so that you can efficiently tell which users or groups have been associated with
any role within projects.
currentUser
- the acting user.name
- this is the name that the role actor is stored under (ex. username of 'admin', group name of
'jira-users')type
- this is the role type parameter, (ex. GroupRoleActor.TYPE, UserRoleActor.TYPE)errorCollection
- will contain any errors in calling the methodProject
's which have a role which contains the role actor with the
specified name and type.List<Long> roleActorOfTypeExistsForProjects(List<Long> projectsToLimitBy, ProjectRole projectRole, String projectRoleType, String projectRoleParameter, ErrorCollection errorCollection)
List<Long> roleActorOfTypeExistsForProjects(ApplicationUser currentUser, List<Long> projectsToLimitBy, ProjectRole projectRole, String projectRoleType, String projectRoleParameter, ErrorCollection errorCollection)
roleActorOfTypeExistsForProjects(java.util.List, com.atlassian.jira.security.roles.ProjectRole, String, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Returns a list of projectId's for which the role actor of the specified type exists in the project for the provided projectRole. This is a method that is meant to efficiently allow discovery of whether a UserRoleActor exists in a project role for a subset of projects.
currentUser
- the acting user.projectsToLimitBy
- this will limit the range of projects the method queries. This is a list of Long, project
id's. The returned list will be either the same as this list or a subset.projectRole
- the project role to find out if an actor is a member of.projectRoleType
- the type of role actor you want to query for, in most cases this will be UserRoleActor.TYPE.projectRoleParameter
- the parameter describing the role actor, in the case of a UserRoleActor this will be
the username.errorCollection
- will contain any errors in calling the methodMap<Long,List<String>> getProjectIdsForUserInGroupsBecauseOfRole(List<Long> projectsToLimitBy, ProjectRole projectRole, String projectRoleType, String userName, ErrorCollection errorCollection)
Map<Long,List<String>> getProjectIdsForUserInGroupsBecauseOfRole(ApplicationUser currentUser, List<Long> projectsToLimitBy, ProjectRole projectRole, String projectRoleType, String userName, ErrorCollection errorCollection)
getProjectIdsForUserInGroupsBecauseOfRole(java.util.List, com.atlassian.jira.security.roles.ProjectRole, String, String, com.atlassian.jira.util.ErrorCollection)
instead. Since v6.0.
Returns a Map of Lists. The key of the map is a Long, project id and the value of the map is a list of group names that the user is a member of for the project. This method is meant to provide an efficient means to discover which groups that are associated with a project role implicitly include the specified user in that project role. We allow you to specify a range of projectsToLimitBy so that you can perform only one query to find this information for many projects for a single projectRole.
currentUser
- the acting user.projectsToLimitBy
- this will limit the range of projects the method queries. This is a list of Long, project
id's. The returned list will be either the same as this list or a subset.projectRole
- the project role to find out if an actor is a member of.projectRoleType
- the type of role actor you want to query for, in most cases this will be UserRoleActor.TYPE.userName
- the username to find out if the user is in the role because of a grouperrorCollection
- will contain any errors in calling the methodboolean hasProjectRolePermission(Project project)
boolean hasProjectRolePermission(ApplicationUser currentUser, Project project)
#hasProjectRolePermission(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.project.Project)
instead. Since v6.0.
Will have permission to modify roles if they are a JIRA admin or, if in enterprise, the user is a project administrator.
currentUser
- the acting user.project
- is the project to check permissions againstServiceResult validateNoRoleUsage(ProjectRole projectRole)
projectRole
- the project role to check.void swapRole(ProjectRole role, ProjectRole swapRole)
role
- the project role that will be replaced.swapRole
- project role that will replace the old role.Copyright © 2002-2016 Atlassian. All Rights Reserved.