com.atlassian.jira.web.action.setup
Class SetupDatabase

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.setup.AbstractSetupAction
                  extended by com.atlassian.jira.web.action.setup.SetupDatabase
All Implemented Interfaces:
ErrorCollection, I18nHelper, AuthorizationSupport, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware

public class SetupDatabase
extends AbstractSetupAction

Action for configuring a database connection for JIRA and testing that it works. Also allows to set the server language for JIRA.

Step 1 of the setup wizard.

Since:
v4.4
See Also:
Serialized Form

Nested Class Summary
static class SetupDatabase.DbMessage
           
 
Nested classes/interfaces inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
JiraWebActionSupport.MessageType
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection
ErrorCollection.Reason
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper
I18nHelper.BeanFactory
 
Field Summary
 
Fields inherited from class com.atlassian.jira.web.action.setup.AbstractSetupAction
DEFAULT_GROUP_ADMINS, DEFAULT_GROUP_DEVELOPERS, DEFAULT_GROUP_USERS, fileFactory, SETUP_ALREADY
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
SetupDatabase(FileFactory fileFactory, IndexLanguageToLocaleMapper languageToLocaleMapper, BuildUtilsInfo buildUtilsInfo, DatabaseConfigurationManager databaseConfigurationManager, ApplicationProperties applicationProperties, VelocityTemplatingEngine velocityEngine)
           
 
Method Summary
 String doDefault()
           
protected  String doExecute()
           
 String doInput()
           
protected  void doValidation()
           
 BuildUtilsInfo getBuildUtilsInfo()
           
 com.atlassian.config.db.DatabaseDetails getDatabaseDetails(String database)
           
 List<SetupDatabase.DbMessage> getDatabaseMessages()
           
 String getDatabaseOption()
           
 String getDatabaseType()
           
 String getDbErrorMessage()
           
 String getDefaultServerLanguage()
           
 List<com.atlassian.core.util.PairType> getExternalDatabases()
           
 Map<String,String> getInstalledLocales()
           
 String getJdbcDatabase()
           
 String getJdbcHostname()
           
 String getJdbcPassword()
           
 String getJdbcPort()
           
 String getJdbcSid()
           
 String getJdbcUsername()
           
 String getLanguage()
           
 String getNonEmptyDatabaseUpgradeDocumentationMessage()
           
 String getSchemaName()
           
 String getSchemaName(String database)
           
 boolean isChangingLanguage()
           
 boolean isDatabaseConnectionTestWorked()
           
 boolean isDatabaseSetup()
           
 boolean isHasDbErrorMessage()
           
 boolean isShowNonEmptyDatabaseUpgradeDocumentationMessage()
           
 boolean isTestingConnection()
           
 int modulo(int index, int modulus)
           
 void setChangingLanguage(boolean changingLanguage)
           
 void setDatabaseOption(String databaseOption)
           
 void setDatabaseType(String databaseType)
           
 void setJdbcDatabase(String jdbcDatabase)
           
 void setJdbcHostname(String jdbcHostname)
           
 void setJdbcPassword(String jdbcPassword)
           
 void setJdbcPort(String jdbcPort)
           
 void setJdbcSid(String jdbcSid)
           
 void setJdbcUsername(String jdbcUsername)
           
 void setLanguage(String language)
           
 void setSchemaName(String schemaName)
           
 void setTestingConnection(boolean testingConnection)
           
 
Methods inherited from class com.atlassian.jira.web.action.setup.AbstractSetupAction
setupAlready, validateFormPathParam, validateSetupPath
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getAuthorizationSupport, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDmyDateFormatter, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraContactHelper, getJiraServiceContext, getLoggedInApplicationUser, getLoggedInUser, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirect, getRedirectSanitiser, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, insertContextPath, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId, urlEncode
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getRemoteUser, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, isKeyDefined, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, getCommandName, 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
getCommandName, setCommand
 

Constructor Detail

SetupDatabase

public SetupDatabase(FileFactory fileFactory,
                     IndexLanguageToLocaleMapper languageToLocaleMapper,
                     BuildUtilsInfo buildUtilsInfo,
                     DatabaseConfigurationManager databaseConfigurationManager,
                     ApplicationProperties applicationProperties,
                     VelocityTemplatingEngine velocityEngine)
Method Detail

doInput

public String doInput()
               throws Exception
Throws:
Exception

doDefault

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

doValidation

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

isShowNonEmptyDatabaseUpgradeDocumentationMessage

public boolean isShowNonEmptyDatabaseUpgradeDocumentationMessage()

getNonEmptyDatabaseUpgradeDocumentationMessage

public String getNonEmptyDatabaseUpgradeDocumentationMessage()

doExecute

protected String doExecute()
                    throws Exception
Overrides:
doExecute in class webwork.action.ActionSupport
Throws:
Exception

isDatabaseConnectionTestWorked

public boolean isDatabaseConnectionTestWorked()

isDatabaseSetup

public boolean isDatabaseSetup()

getInstalledLocales

public Map<String,String> getInstalledLocales()

getExternalDatabases

public List<com.atlassian.core.util.PairType> getExternalDatabases()

getDatabaseMessages

public List<SetupDatabase.DbMessage> getDatabaseMessages()

getDatabaseDetails

public com.atlassian.config.db.DatabaseDetails getDatabaseDetails(String database)

getSchemaName

public String getSchemaName(String database)

getDefaultServerLanguage

public String getDefaultServerLanguage()

getDatabaseType

public String getDatabaseType()

setDatabaseType

public void setDatabaseType(String databaseType)

getDatabaseOption

public String getDatabaseOption()

setDatabaseOption

public void setDatabaseOption(String databaseOption)

getLanguage

public String getLanguage()
Overrides:
getLanguage in class JiraWebActionSupport

setLanguage

public void setLanguage(String language)

getBuildUtilsInfo

public BuildUtilsInfo getBuildUtilsInfo()

modulo

public int modulo(int index,
                  int modulus)

isTestingConnection

public boolean isTestingConnection()

setTestingConnection

public void setTestingConnection(boolean testingConnection)

getJdbcHostname

public String getJdbcHostname()

setJdbcHostname

public void setJdbcHostname(String jdbcHostname)

getJdbcPassword

public String getJdbcPassword()

setJdbcPassword

public void setJdbcPassword(String jdbcPassword)

getJdbcPort

public String getJdbcPort()

setJdbcPort

public void setJdbcPort(String jdbcPort)

getJdbcDatabase

public String getJdbcDatabase()

setJdbcDatabase

public void setJdbcDatabase(String jdbcDatabase)

getJdbcSid

public String getJdbcSid()

setJdbcSid

public void setJdbcSid(String jdbcSid)

getJdbcUsername

public String getJdbcUsername()

setJdbcUsername

public void setJdbcUsername(String jdbcUsername)

getSchemaName

public String getSchemaName()

setSchemaName

public void setSchemaName(String schemaName)

isChangingLanguage

public boolean isChangingLanguage()

setChangingLanguage

public void setChangingLanguage(boolean changingLanguage)

isHasDbErrorMessage

public boolean isHasDbErrorMessage()

getDbErrorMessage

public String getDbErrorMessage()


Copyright © 2002-2013 Atlassian. All Rights Reserved.