com.atlassian.jira.util
Class BugzillaImportBean

java.lang.Object
  extended bycom.atlassian.jira.util.BugzillaImportBean

public class BugzillaImportBean
extends java.lang.Object


Nested Class Summary
static class BugzillaImportBean.DefaultBugzillaMappingBean
           
 
Constructor Summary
BugzillaImportBean()
           
 
Method Summary
 void create(com.atlassian.jira.util.BugzillaImportBean.BugzillaMappingBean bugzillaMappingBean, BugzillaConnectionBean connectionBean, boolean enableNotifications, boolean reuseExistingUsers, boolean reindex, java.lang.String[] projectNames, User importer)
          Main method of this bean.
static java.util.List getAllBugzillaProjects(BugzillaConnectionBean connectionBean)
           
 java.lang.String getFullNameFromEmail(java.lang.String email)
           
 java.lang.String getImportLog()
           
 java.lang.String getProjectKey(java.lang.String name)
           
 java.lang.String getProjectList(java.lang.String[] selectList)
          Generate SQL-friendly quoted comma-separated list of projects.
protected  java.util.Map retrieveImportedIssues()
          Return a map of bugzillaKey (Integer) -> Jira Issues Id (Integer).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BugzillaImportBean

public BugzillaImportBean()
Method Detail

create

public void create(com.atlassian.jira.util.BugzillaImportBean.BugzillaMappingBean bugzillaMappingBean,
                   BugzillaConnectionBean connectionBean,
                   boolean enableNotifications,
                   boolean reuseExistingUsers,
                   boolean reindex,
                   java.lang.String[] projectNames,
                   User importer)
            throws java.lang.Exception,
                   IndexException,
                   GenericEntityException
Main method of this bean. Creates JIRA projects mirroring those found in a Bugzilla database.

Parameters:
bugzillaMappingBean - Mappings from Bugzilla to JIRA, including project key, statuses, etc
enableNotifications - Whether to send email notifications for newly created issues
reuseExistingUsers - Do we try to reuse existing users, or create a unique user for every Bugzilla user?
reindex -
projectNames - Array of Bugzilla project names to import
importer -
Throws:
java.lang.Exception
IndexException
GenericEntityException

getProjectList

public java.lang.String getProjectList(java.lang.String[] selectList)
Generate SQL-friendly quoted comma-separated list of projects.


retrieveImportedIssues

protected java.util.Map retrieveImportedIssues()
                                        throws GenericEntityException
Return a map of bugzillaKey (Integer) -> Jira Issues Id (Integer).

It does this by looking through the change items for the bugzilla import key.

Throws:
GenericEntityException

getProjectKey

public java.lang.String getProjectKey(java.lang.String name)

getFullNameFromEmail

public java.lang.String getFullNameFromEmail(java.lang.String email)

getImportLog

public java.lang.String getImportLog()

getAllBugzillaProjects

public static java.util.List getAllBugzillaProjects(BugzillaConnectionBean connectionBean)
                                             throws java.sql.SQLException
Throws:
java.sql.SQLException