com.atlassian.jira.web.action.util
Class BugzillaImport

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
              extended by com.atlassian.jira.web.action.util.BugzillaImport
All Implemented Interfaces:
ErrorCollection, I18nHelper, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class BugzillaImport
extends JiraWebActionSupport

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, savedFilters, selectedProject
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
BugzillaImport(WorkflowManager workflowManager, ProjectManager projectManager, ApplicationProperties applicationProperties, UserUtil userUtil)
           
 
Method Summary
 String doDefault()
           
 boolean doesImportExceedUserLimit()
           
 String doExecute()
           
 String doMap()
           
 String doMonitor()
           
 String doRun()
           
 String doSetProjectDefaults()
           
protected  void doValidation()
           
 boolean getAttachmentsEnabled()
           
 List getAvailableProjects()
           
 String getDriverName()
           
 boolean getEnableNotifications()
           
 Set getFirstIssueKeysWithTruncatedSummaries()
          Returns a sub-set of issues keys, up to a number returned by getShortListMaxCount()
 String getImportLog()
           
 Set getIssueKeysWithTruncatedSummaries()
           
 boolean getIssueLinkingEnabled()
           
 int getOverSizedSummariesCount(String bugzillaProjectName)
          Returns number of issues that have summary length over the acceptable limit (SummarySystemField.MAX_LEN) for given project.
 String getPassword()
           
 boolean getReuseExistingUsers()
           
 String[] getSelectedProjectIds()
           
 Map getSelectedProjectKeys()
           
 String[] getSelectedProjects()
           
 int getShortListMaxCount()
          Returns maximum count for shortlisting issues with truncated summaries.
 int getSummaryMaxLength()
          Returns the maximum length of the issue summary field.
 Set getUnknownUsers()
           
 String getUrl()
           
 String getUsername()
           
 boolean isOnlyNew()
           
 boolean isReindex()
           
 boolean projectWithNameExists(String projectName)
           
 void setDriverName(String driverName)
           
 void setEnablenotifications(boolean enableNotifications)
           
 void setOnlyNew(boolean onlyNew)
           
 void setPassword(String password)
           
 void setReindex(boolean reindex)
           
 void setReuseExistingUsers(boolean reuseExistingUsers)
           
 void setSelectedProjects(String[] selectList)
           
 void setUrl(String url)
           
 void setUsername(String name)
           
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getSearchSortReverseDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUserFullName, getVersionManager, getWebworkStack, getWebworkStack, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isSystemAdministrator, isUserExists, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Constructor Detail

BugzillaImport

public BugzillaImport(WorkflowManager workflowManager,
                      ProjectManager projectManager,
                      ApplicationProperties applicationProperties,
                      UserUtil userUtil)
Method Detail

doDefault

public String doDefault()
                 throws Exception
Overrides:
doDefault in class webwork.action.ActionSupport
Throws:
Exception

doValidation

protected void doValidation()
Overrides:
doValidation in class webwork.action.ActionSupport

doExecute

public String doExecute()
Overrides:
doExecute in class webwork.action.ActionSupport

doSetProjectDefaults

public String doSetProjectDefaults()
                            throws Exception
Throws:
Exception

getOverSizedSummariesCount

public int getOverSizedSummariesCount(String bugzillaProjectName)
Returns number of issues that have summary length over the acceptable limit (SummarySystemField.MAX_LEN) for given project.

Parameters:
bugzillaProjectName - Bugzilla project name
Returns:
non-negative integer
Since:
v3.11

getSummaryMaxLength

public int getSummaryMaxLength()
Returns the maximum length of the issue summary field.

Returns:
the maximum length of the issue summary field
Since:
v3.11
See Also:
SummarySystemField.MAX_LEN

doMap

public String doMap()
             throws Exception
Throws:
Exception

doRun

public String doRun()
             throws Exception
Throws:
Exception

doesImportExceedUserLimit

public boolean doesImportExceedUserLimit()

doMonitor

public String doMonitor()

getAttachmentsEnabled

public boolean getAttachmentsEnabled()

getIssueLinkingEnabled

public boolean getIssueLinkingEnabled()

getUsername

public String getUsername()

getSelectedProjects

public String[] getSelectedProjects()

getSelectedProjectIds

public String[] getSelectedProjectIds()

projectWithNameExists

public boolean projectWithNameExists(String projectName)

getSelectedProjectKeys

public Map getSelectedProjectKeys()

setSelectedProjects

public void setSelectedProjects(String[] selectList)

getAvailableProjects

public List getAvailableProjects()
                          throws Exception
Throws:
Exception

setUsername

public void setUsername(String name)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

getDriverName

public String getDriverName()

setDriverName

public void setDriverName(String driverName)

getEnableNotifications

public boolean getEnableNotifications()

setEnablenotifications

public void setEnablenotifications(boolean enableNotifications)

setReuseExistingUsers

public void setReuseExistingUsers(boolean reuseExistingUsers)

getReuseExistingUsers

public boolean getReuseExistingUsers()

isReindex

public boolean isReindex()

setReindex

public void setReindex(boolean reindex)

isOnlyNew

public boolean isOnlyNew()

setOnlyNew

public void setOnlyNew(boolean onlyNew)

getImportLog

public String getImportLog()

getIssueKeysWithTruncatedSummaries

public Set getIssueKeysWithTruncatedSummaries()

getFirstIssueKeysWithTruncatedSummaries

public Set getFirstIssueKeysWithTruncatedSummaries()
Returns a sub-set of issues keys, up to a number returned by getShortListMaxCount()

Returns:
a sub-set of issues keys

getShortListMaxCount

public int getShortListMaxCount()
Returns maximum count for shortlisting issues with truncated summaries. This is used on the result page after successful import (bugzilla_run.jsp).

Returns:
hard-coded number 3

getUnknownUsers

public Set getUnknownUsers()


Copyright © 2002-2009 Atlassian. All Rights Reserved.