com.atlassian.jira.scheme.mapper
Class SchemeTransformResult

java.lang.Object
  extended by com.atlassian.jira.scheme.mapper.SchemeTransformResult

public class SchemeTransformResult
extends Object

This class represents the result of a single GroupToRole transform as performed by the SchemeGroupsToRolesTransformer. NOTE: this object is statefull and is NOT threadsafe.


Constructor Summary
SchemeTransformResult(Scheme originalScheme)
           
 
Method Summary
 void addRoleMappingForGroup(GroupToRoleMapping groupToRoleMapping, com.atlassian.crowd.embedded.api.Group group)
          This creates an association between a groupName and a ProjectRole.
 Collection getAssociatedProjects()
          Gets all the associated Project's for the originalScheme.
 Scheme getOriginalScheme()
          The original scheme that was the template for the transform operation.
 Scheme getResultingScheme()
           
 Collection getRoleToGroupsMappings()
          This will return all the RoleToGroupsMapping's that are defined for this scheme transformation.
 Scheme getTransformedScheme()
          Gets the resulting Scheme from the transform operation.
 boolean originalSchemeTransformed()
           
 void setAssociatedProjects(Collection projects)
           
 void setResultingScheme(Scheme resultingScheme)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemeTransformResult

public SchemeTransformResult(Scheme originalScheme)
Method Detail

originalSchemeTransformed

public boolean originalSchemeTransformed()

getTransformedScheme

public Scheme getTransformedScheme()
Gets the resulting Scheme from the transform operation. NOTE: this scheme does not exist within the persistent store.

Returns:
Scheme object representing the newly created scheme.

getOriginalScheme

public Scheme getOriginalScheme()
The original scheme that was the template for the transform operation.

Returns:
Scheme object representing the original scheme. This should never be null.

getAssociatedProjects

public Collection getAssociatedProjects()
Gets all the associated Project's for the originalScheme.

Returns:
a Collection of Project's, empty list if there are none.

setAssociatedProjects

public void setAssociatedProjects(Collection projects)

addRoleMappingForGroup

public void addRoleMappingForGroup(GroupToRoleMapping groupToRoleMapping,
                                   com.atlassian.crowd.embedded.api.Group group)
This creates an association between a groupName and a ProjectRole. The ProjectRole is defined in the passed in GroupToRoleMapping.

Parameters:
groupToRoleMapping - defineds the ProjectRole to associate with
group - the group to associate with

getRoleToGroupsMappings

public Collection getRoleToGroupsMappings()
This will return all the RoleToGroupsMapping's that are defined for this scheme transformation.

Returns:
Collection of Group objects, and Empty collection if there are no mappings.

getResultingScheme

public Scheme getResultingScheme()

setResultingScheme

public void setResultingScheme(Scheme resultingScheme)


Copyright © 2002-2013 Atlassian. All Rights Reserved.