com.atlassian.jira.imports.project.util
Class IssueTypeImportHelper

java.lang.Object
  extended by com.atlassian.jira.imports.project.util.IssueTypeImportHelper

public class IssueTypeImportHelper
extends java.lang.Object

Contains shared functions around issue types required for project import.

Since:
v3.13

Constructor Summary
IssueTypeImportHelper(ConstantsManager constantsManager, ProjectManager projectManager, IssueTypeSchemeManager issueTypeSchemeManager)
           
 
Method Summary
 IssueType getIssueTypeForName(java.lang.String name)
          Returns the IssueType, in the current system, with the given name.
 boolean isIssueTypeValidForProject(java.lang.String projectKey, java.lang.String newIssueTypeId)
          Checks the projects issue type scheme to determine if the issue type identified by newIssueTypeId is contained in the projects scheme.
 boolean isMappingValid(IssueType newIssueType, java.lang.String projectKey, boolean oldIssueTypeIsSubTask)
          Checks to see that the issue type is valid for the provided project key and that its subtask-ness matches the old issue type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueTypeImportHelper

public IssueTypeImportHelper(ConstantsManager constantsManager,
                             ProjectManager projectManager,
                             IssueTypeSchemeManager issueTypeSchemeManager)
Method Detail

getIssueTypeForName

public IssueType getIssueTypeForName(java.lang.String name)
Returns the IssueType, in the current system, with the given name. If no Issue Type exists with this name, then returns null.

Parameters:
name - name of the IssueType.
Returns:
the IssueType in the current system with the given name.

isMappingValid

public boolean isMappingValid(IssueType newIssueType,
                              java.lang.String projectKey,
                              boolean oldIssueTypeIsSubTask)
Checks to see that the issue type is valid for the provided project key and that its subtask-ness matches the old issue type.

Parameters:
newIssueType - the issueType to be inspected, should not be null
projectKey - the project key to see if the issue type is relevant for that project
oldIssueTypeIsSubTask - true if the old issue type was a subtask issue type, false otherwise
Returns:
true if the newIssueType passes the validation, false otherwise

isIssueTypeValidForProject

public boolean isIssueTypeValidForProject(java.lang.String projectKey,
                                          java.lang.String newIssueTypeId)
Checks the projects issue type scheme to determine if the issue type identified by newIssueTypeId is contained in the projects scheme.

Parameters:
projectKey - identifies the project
newIssueTypeId - identifies the issue type to check
Returns:
true if the issue type is a part of the projects issue type scheme, false otherwise.


Copyright © 2002-2010 Atlassian. All Rights Reserved.