|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.BugzillaImportBean
public class BugzillaImportBean
Nested Class Summary | |
---|---|
static class |
BugzillaImportBean.DefaultBugzillaMappingBean
|
Field Summary | |
---|---|
static String |
BUGZILLA_ID_CF_NAME
|
static String |
BUGZILLA_ID_SEARCHER
|
static String |
BUGZILLA_ID_TYPE
|
(package private) StringBuffer |
importLog
|
Constructor Summary | |
---|---|
BugzillaImportBean(IssueIndexManager indexManager,
org.ofbiz.core.entity.GenericDelegator genericDelegator,
ProjectManager projectManager,
PermissionSchemeManager permissionSchemeManager,
CacheManager cacheManager,
VersionManager versionManager,
VoteManager voteManager,
ProjectComponentManager projectComponentManager,
CustomFieldManager customFieldManager,
IssueManager issueManager,
AttachmentManager attachmentManager,
IssueTypeScreenSchemeManager issueTypeScreenSchemeManager,
PermissionManager permissionManager,
IssueLinkManager issueLinkManager,
IssueLinkTypeManager issueLinkTypeManager,
ConstantsManager constantsManager,
ExternalUtils externalUtils,
CommentManager commentManager,
IssueFactory issueFactory,
WorklogManager worklogManager,
ApplicationProperties applicationProperties,
WatcherManager watcherManager)
|
Method Summary | |
---|---|
String |
commaSeparate(Collection coll)
Returns comma-separated text values of a list of objects. |
void |
create(com.atlassian.jira.util.BugzillaImportBean.BugzillaMappingBean bugzillaMappingBean,
BugzillaConnectionBean connectionBean,
boolean enableNotifications,
boolean reuseExistingUsers,
boolean onlyNewIssues,
boolean reindex,
boolean workHistory,
String[] projectNames,
User importer)
Main method of this bean. |
static Map |
getAllBugzillaProjects(BugzillaConnectionBean connectionBean)
|
String |
getFullNameFromEmail(String email)
|
Integer |
getIdFromStartOfString(String s)
Return an integer prefix of a string, if any. |
String |
getImportLog()
|
Set |
getNonExistentAssociatedUsers(BugzillaConnectionBean connectionBean,
String[] projectNames)
This method will determine all the users that will need to exist in JIRA to successfully import the specified projects and will return the users that do not yet exist. |
String |
getProjectKey(String name)
|
protected String |
getUsernameFromBugzillaProfile(ResultSet bugzillaProfileResultSet)
Given a Bugzilla 'profile' user record, infer a JIRA username from it. |
static boolean |
isOldBugzilla(Connection conn)
By examining the schema, determines if we're importing from <=2.16 or 2.17+ |
protected Map |
retrieveImportedIssues()
Return a map of bugzillaKey (Integer) -> Jira Issues Id (Integer). |
String |
rewriteBugLinkInText(String str,
String parentIssueKey)
Rewrite inline bug links ('bug #1234' etc) in a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
StringBuffer importLog
public static final String BUGZILLA_ID_TYPE
public static final String BUGZILLA_ID_SEARCHER
public static final String BUGZILLA_ID_CF_NAME
Constructor Detail |
---|
public BugzillaImportBean(IssueIndexManager indexManager, org.ofbiz.core.entity.GenericDelegator genericDelegator, ProjectManager projectManager, PermissionSchemeManager permissionSchemeManager, CacheManager cacheManager, VersionManager versionManager, VoteManager voteManager, ProjectComponentManager projectComponentManager, CustomFieldManager customFieldManager, IssueManager issueManager, AttachmentManager attachmentManager, IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, PermissionManager permissionManager, IssueLinkManager issueLinkManager, IssueLinkTypeManager issueLinkTypeManager, ConstantsManager constantsManager, ExternalUtils externalUtils, CommentManager commentManager, IssueFactory issueFactory, WorklogManager worklogManager, ApplicationProperties applicationProperties, WatcherManager watcherManager)
Method Detail |
---|
public Set getNonExistentAssociatedUsers(BugzillaConnectionBean connectionBean, String[] projectNames)
connectionBean
- initialized connection beanprojectNames
- the projects, by bugzilla project name, that you want to import.
public void create(com.atlassian.jira.util.BugzillaImportBean.BugzillaMappingBean bugzillaMappingBean, BugzillaConnectionBean connectionBean, boolean enableNotifications, boolean reuseExistingUsers, boolean onlyNewIssues, boolean reindex, boolean workHistory, String[] projectNames, User importer) throws Exception, IndexException, org.ofbiz.core.entity.GenericEntityException
bugzillaMappingBean
- Mappings from Bugzilla to JIRA, including project key, statuses, etcenableNotifications
- Whether to send email notifications for newly created issuesreuseExistingUsers
- Do we try to reuse existing users, or create a unique user for every Bugzilla user?onlyNewIssues
- Should we only import issues that haven't previously been imported (to avoid duplicates)?reindex
- Whether to reindex after the importprojectNames
- Array of Bugzilla project names to importimporter
-
Exception
IndexException
org.ofbiz.core.entity.GenericEntityException
protected Map retrieveImportedIssues() throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public String commaSeparate(Collection coll)
protected String getUsernameFromBugzillaProfile(ResultSet bugzillaProfileResultSet) throws SQLException
SQLException
public String rewriteBugLinkInText(String str, String parentIssueKey)
str
- The text to rewriteparentIssueKey
- Issue this text came from (purely for logging).
public Integer getIdFromStartOfString(String s)
public String getProjectKey(String name) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public String getFullNameFromEmail(String email)
public static boolean isOldBugzilla(Connection conn) throws SQLException
SQLException
public String getImportLog()
public static Map getAllBugzillaProjects(BugzillaConnectionBean connectionBean) throws SQLException
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |