|
||||||||||
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 java.lang.String |
BUGZILLA_ID_CF_NAME
|
static java.lang.String |
BUGZILLA_ID_SEARCHER
|
static java.lang.String |
BUGZILLA_ID_TYPE
|
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,
LabelManager labelManager,
UserUtil userUtil)
|
Method Summary | |
---|---|
java.lang.String |
commaSeparate(java.util.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,
java.lang.String[] projectNames,
com.opensymphony.user.User importer)
Main method of this bean. |
static java.util.List |
getAllBugzillaProjects(BugzillaConnectionBean connectionBean)
|
java.lang.String |
getFullNameFromEmail(java.lang.String email)
|
java.lang.Integer |
getIdFromStartOfString(java.lang.String s)
Return an integer prefix of a string, if any. |
java.lang.String |
getImportLog()
|
java.util.Set |
getNonExistentAssociatedUsers(BugzillaConnectionBean connectionBean,
java.lang.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. |
java.lang.String |
getProjectKey(java.lang.String name)
|
java.util.Set |
getTruncSummaryIssueKeys()
Returns an unmodifiable set of issue keys that have summaries longer that acceptable by JIRA |
protected java.lang.String |
getUsernameFromBugzillaProfile(java.sql.ResultSet bugzillaProfileResultSet)
Given a Bugzilla 'profile' user record, infer a JIRA username from it. |
static boolean |
isOldBugzilla(java.sql.Connection conn)
By examining the schema, determines if we're importing from <=2.16 or 2.17+ |
protected java.util.Map |
retrieveImportedIssues()
Return a map of bugzillaKey (Integer) -> Jira Issues Id (Integer). |
java.lang.String |
rewriteBugLinkInText(java.lang.String str,
java.lang.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 |
---|
public static final java.lang.String BUGZILLA_ID_TYPE
public static final java.lang.String BUGZILLA_ID_SEARCHER
public static final java.lang.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, LabelManager labelManager, UserUtil userUtil)
Method Detail |
---|
public java.util.Set getNonExistentAssociatedUsers(BugzillaConnectionBean connectionBean, java.lang.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, java.lang.String[] projectNames, com.opensymphony.user.User importer) throws java.lang.Exception
bugzillaMappingBean
- Mappings from Bugzilla to JIRA, including project key, statuses, etcconnectionBean
- Bugzilla connection beanenableNotifications
- 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 importworkHistory
- Whether to import work history as wellprojectNames
- Array of Bugzilla project names to importimporter
- User performing the import operation
java.lang.Exception
- if something goes wrongprotected java.util.Map retrieveImportedIssues() throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- if cannot read from change itemspublic java.lang.String commaSeparate(java.util.Collection coll)
coll
- collection of objects to comma separate
protected java.lang.String getUsernameFromBugzillaProfile(java.sql.ResultSet bugzillaProfileResultSet) throws java.sql.SQLException
bugzillaProfileResultSet
- profile result set
java.sql.SQLException
- if reading from result set failspublic java.lang.String rewriteBugLinkInText(java.lang.String str, java.lang.String parentIssueKey)
str
- The text to rewriteparentIssueKey
- Issue this text came from (purely for logging).
public java.lang.Integer getIdFromStartOfString(java.lang.String s)
s
- String containing id
public java.lang.String getProjectKey(java.lang.String name) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public java.lang.String getFullNameFromEmail(java.lang.String email)
public static boolean isOldBugzilla(java.sql.Connection conn) throws java.sql.SQLException
conn
- connection
java.sql.SQLException
- if cannot read from the databasepublic java.lang.String getImportLog()
public static java.util.List getAllBugzillaProjects(BugzillaConnectionBean connectionBean) throws java.sql.SQLException
java.sql.SQLException
public java.util.Set getTruncSummaryIssueKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |