|
||||||||||
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
|
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)
|
Set |
getTruncSummaryIssueKeys()
Returns an unmodifiable set of issue keys that have summaries longer that acceptable by JIRA |
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 |
---|
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
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
Exception
- if something goes wrongprotected Map retrieveImportedIssues() throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- if cannot read from change itemspublic String commaSeparate(Collection coll)
coll
- collection of objects to comma separate
protected String getUsernameFromBugzillaProfile(ResultSet bugzillaProfileResultSet) throws SQLException
bugzillaProfileResultSet
- profile result set
SQLException
- if reading from result set failspublic String rewriteBugLinkInText(String str, String parentIssueKey)
str
- The text to rewriteparentIssueKey
- Issue this text came from (purely for logging).
public Integer getIdFromStartOfString(String s)
s
- String containing id
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
conn
- connection
SQLException
- if cannot read from the databasepublic String getImportLog()
public static Map getAllBugzillaProjects(BugzillaConnectionBean connectionBean) throws SQLException
SQLException
public Set getTruncSummaryIssueKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |