com.atlassian.jira.rpc.soap.service
Interface ProjectRoleService

All Known Implementing Classes:
ProjectRoleServiceImpl

public interface ProjectRoleService

Must be used to access all ProjectRole functionality.


Method Summary
 void addActorsToProjectRole(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String[] actors, RemoteProjectRole projectRole, RemoteProject project, java.lang.String actorType)
          Will add project role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.
 void addDefaultActorsToProjectRole(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String[] actors, RemoteProjectRole projectRole, java.lang.String type)
          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.
 RemoteProjectRole createProjectRole(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole)
          Will create the project role based off the passed in projectRole.getName(), projectRole.getDescription() and checking the currentUser has the correct permissions to perform the create operation.
 void deleteProjectRole(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole, boolean confirm)
          Will delete the project role based off the passed in projectRole and checking the currentUser has the correct permissions to perform the delete operation.
 RemoteScheme[] getAssociatedNotificationSchemes(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole)
          Will get all notification scheme's that the specified projectRole is currently used in.
 RemoteScheme[] getAssociatedPermissionSchemes(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole)
          Will get all permission scheme's that the specified projectRole is currently used in.
 RemoteRoleActors getDefaultRoleActors(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole)
          Will return the project role actors based off the passed in projectRole checking the currentUser has the correct permissions to perform the get operation.
 RemoteProjectRole getProjectRole(com.atlassian.crowd.embedded.api.User currentUser, java.lang.Long id)
          Will return the project role based off the passed in id, and checking the currentUser has the correct permissions to perform the operation.
 RemoteProjectRoleActors getProjectRoleActors(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole, RemoteProject project)
          Will return the project role actors based off the passed in projectRole and project checking the currentUser has the correct permissions to perform the get operation.
 RemoteProjectRole[] getProjectRoles(com.atlassian.crowd.embedded.api.User currentUser)
          Get all the ProjectRoles available in JIRA.
 boolean isProjectRoleNameUnique(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String name)
          Will tell you if a role name exists or not.
 void removeActorsFromProjectRole(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String[] actors, RemoteProjectRole projectRole, RemoteProject project, java.lang.String actorType)
          Will remove project role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.
 void removeAllRoleActorsByNameAndType(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String name, java.lang.String type)
          Will remove all role actors with the specified name and the specified type.
 void removeAllRoleActorsByProject(com.atlassian.crowd.embedded.api.User currentUser, RemoteProject project)
          Will remove all role actors associated with the specified project.
 void removeDefaultActorsFromProjectRole(com.atlassian.crowd.embedded.api.User currentUser, java.lang.String[] actors, RemoteProjectRole projectRole, java.lang.String actorType)
          Will remove default role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.
 void updateProjectRole(com.atlassian.crowd.embedded.api.User currentUser, RemoteProjectRole projectRole)
          Will update the project role based off the passed in projectRole and checking the currentUser has the correct permissions to perform the update operation.
 

Method Detail

getProjectRoles

RemoteProjectRole[] getProjectRoles(com.atlassian.crowd.embedded.api.User currentUser)
                                    throws RemoteException
Get all the ProjectRoles available in JIRA. Currently this list is global.

Returns:
The global list of project roles in JIRA
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

getProjectRole

RemoteProjectRole getProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                                 java.lang.Long id)
                                 throws RemoteException
Will return the project role based off the passed in id, and checking the currentUser has the correct permissions to perform the operation.

Parameters:
currentUser -
id -
Returns:
the ProjectRole for the given id
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

createProjectRole

RemoteProjectRole createProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                                    RemoteProjectRole projectRole)
                                    throws RemoteException
Will create the project role based off the passed in projectRole.getName(), projectRole.getDescription() and checking the currentUser has the correct permissions to perform the create operation.

Parameters:
currentUser -
projectRole - can not be null and will contain the name and description for the project role to create
Returns:
the ProjectRole object that was created
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

isProjectRoleNameUnique

boolean isProjectRoleNameUnique(com.atlassian.crowd.embedded.api.User currentUser,
                                java.lang.String name)
                                throws RemoteException
Will tell you if a role name exists or not.

Parameters:
name - the name of the project role to check
Returns:
true if unique, false if one already exists with that name
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

deleteProjectRole

void deleteProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                       RemoteProjectRole projectRole,
                       boolean confirm)
                       throws RemoteException
Will delete the project role based off the passed in projectRole and checking the currentUser has the correct permissions to perform the delete operation. This will also delete all ProjectRoleActor associations that it is the parent of. If the confirm flag is false then this method will check to see if the role is associated with any permission or notification schemes and if so it will throw an exception informing you which schemes and it will not perform the delete. To force a delete pass the confirm flag in as true.

Parameters:
currentUser -
projectRole -
confirm -
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException - thrown if the confirm flag is false and the role is used by a notification or permission scheme.

addActorsToProjectRole

void addActorsToProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                            java.lang.String[] actors,
                            RemoteProjectRole projectRole,
                            RemoteProject project,
                            java.lang.String actorType)
                            throws RemoteException
Will add project role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.

Parameters:
currentUser -
actors - is a list of strings that they RoleActor impl should be able to handle
projectRole - is the project role to associate with
project - is the project to associate with
actorType - is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE ("atlassian-user-role-actor"), GroupRoleActor.TYPE ("atlassian-group-role-actor"))
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

removeActorsFromProjectRole

void removeActorsFromProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                                 java.lang.String[] actors,
                                 RemoteProjectRole projectRole,
                                 RemoteProject project,
                                 java.lang.String actorType)
                                 throws RemoteException
Will remove project role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.

Parameters:
currentUser -
actors - is a list of strings that the RoleActor impl should be able to handle
projectRole - is the project role to associate with
project - is the project to associate with
actorType - is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE ("atlassian-user-role-actor"), GroupRoleActor.TYPE ("atlassian-group-role-actor"))
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

updateProjectRole

void updateProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                       RemoteProjectRole projectRole)
                       throws RemoteException
Will update the project role based off the passed in projectRole and checking the currentUser has the correct permissions to perform the update operation.

Parameters:
currentUser -
projectRole -
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

getProjectRoleActors

RemoteProjectRoleActors getProjectRoleActors(com.atlassian.crowd.embedded.api.User currentUser,
                                             RemoteProjectRole projectRole,
                                             RemoteProject project)
                                             throws RemoteException
Will return the project role actors based off the passed in projectRole and project checking the currentUser has the correct permissions to perform the get operation.

Parameters:
currentUser -
projectRole -
project -
Returns:
the ProjectRoleActor representing the projectRole and project
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

getDefaultRoleActors

RemoteRoleActors getDefaultRoleActors(com.atlassian.crowd.embedded.api.User currentUser,
                                      RemoteProjectRole projectRole)
                                      throws RemoteException
Will return the project role actors based off the passed in projectRole checking the currentUser has the correct permissions to perform the get operation.

Parameters:
currentUser -
projectRole -
Returns:
the remote default role actors
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

addDefaultActorsToProjectRole

void addDefaultActorsToProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                                   java.lang.String[] actors,
                                   RemoteProjectRole projectRole,
                                   java.lang.String type)
                                   throws RemoteException
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.

Parameters:
currentUser -
actors - is a list of strings that the RoleActor impl should be able to handle
projectRole - is the project role to associate with
type - is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

removeDefaultActorsFromProjectRole

void removeDefaultActorsFromProjectRole(com.atlassian.crowd.embedded.api.User currentUser,
                                        java.lang.String[] actors,
                                        RemoteProjectRole projectRole,
                                        java.lang.String actorType)
                                        throws RemoteException
Will remove default role actor associations based off the passed in actors and checking the currentUser has the correct permissions to perform the update operation.

Parameters:
currentUser -
actors - is a list of strings that they RoleActor impl should be able to handle
projectRole - is the project role to associate with
actorType - is a type that defines the type of role actor to instantiate (ex./ UserRoleActor.TYPE, GroupRoleActor.TYPE)
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

removeAllRoleActorsByNameAndType

void removeAllRoleActorsByNameAndType(com.atlassian.crowd.embedded.api.User currentUser,
                                      java.lang.String name,
                                      java.lang.String type)
                                      throws RemoteException
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).

Parameters:
currentUser -
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)
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

removeAllRoleActorsByProject

void removeAllRoleActorsByProject(com.atlassian.crowd.embedded.api.User currentUser,
                                  RemoteProject project)
                                  throws RemoteException
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).

Parameters:
currentUser -
project -
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

getAssociatedNotificationSchemes

RemoteScheme[] getAssociatedNotificationSchemes(com.atlassian.crowd.embedded.api.User currentUser,
                                                RemoteProjectRole projectRole)
                                                throws RemoteException
Will get all notification scheme's that the specified projectRole is currently used in.

Parameters:
currentUser -
projectRole -
Returns:
a collection of schemes
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException

getAssociatedPermissionSchemes

RemoteScheme[] getAssociatedPermissionSchemes(com.atlassian.crowd.embedded.api.User currentUser,
                                              RemoteProjectRole projectRole)
                                              throws RemoteException
Will get all permission scheme's that the specified projectRole is currently used in.

Parameters:
currentUser -
projectRole -
Returns:
a collection of schemes
Throws:
RemoteValidationException - thrown if and invalid parameter is passed or if the currentUser does not have permission to perform the operation.
RemoteException


Copyright © 2004-2011 Atlassian. All Rights Reserved.