public class

SchemeGroupsToRolesTransformerImpl

extends Object
implements SchemeGroupsToRolesTransformer
java.lang.Object
   ↳ com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformerImpl

Class Overview

Implementation of SchemeGroupsToRolesTransformer.

Summary

Public Constructors
SchemeGroupsToRolesTransformerImpl(SchemeManagerFactory schemeManagerFactory, ProjectRoleManager projectRoleManager, RoleActorFactory roleActorFactory, IssueSecurityLevelManager issueSecurityLevelManager, GroupManager groupManager)
Public Methods
SchemeTransformResults doTransform(List schemes, Set groupToRoleMappings)
This will take a list of Scheme's and transform their associated SchemeEntity's of type 'group' to the project roles that are mapped via the passed in GroupToRoleMapping's.
void persistTransformationResults(SchemeTransformResults schemeTransformResults)
This method, given a SchemeTransformResult will 'unpack' all the users in the groups that are mapped to each ProjectRole and then add the users to that ProjectRole for the Project's that are associated with this SchemeTransformResults original.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.scheme.mapper.SchemeGroupsToRolesTransformer

Public Constructors

public SchemeGroupsToRolesTransformerImpl (SchemeManagerFactory schemeManagerFactory, ProjectRoleManager projectRoleManager, RoleActorFactory roleActorFactory, IssueSecurityLevelManager issueSecurityLevelManager, GroupManager groupManager)

Public Methods

public SchemeTransformResults doTransform (List schemes, Set groupToRoleMappings)

This will take a list of Scheme's and transform their associated SchemeEntity's of type 'group' to the project roles that are mapped via the passed in GroupToRoleMapping's.

Parameters
schemes the List of Scheme's that should be transformed. NOTE: there will be one SchemeTransformResult per scheme passed in.
groupToRoleMappings defines the group SchemeEntity's that will be replaced by the defined ProjectRole SchemeEntity.
Returns
  • a collection of SchemeTransformResult's. An empty collection if the passed in schemes are null or empty.

public void persistTransformationResults (SchemeTransformResults schemeTransformResults)

This method, given a SchemeTransformResult will 'unpack' all the users in the groups that are mapped to each ProjectRole and then add the users to that ProjectRole for the Project's that are associated with this SchemeTransformResults original. It will also save the resulting transformed scheme, renaming the original scheme to 'Backup of ...'. Scheme.

Parameters
schemeTransformResults - contains the results of the GroupToRoles transform as created by the doTransform method of this class.