Class AbstractSetupDatabaseAction
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.confluence.core.ConfluenceActionSupport
-
- com.atlassian.confluence.setup.actions.AbstractSetupAction
-
- com.atlassian.confluence.setup.actions.AbstractSetupDatabaseAction
-
- All Implemented Interfaces:
WebInterface
,MessageHolderAware
,com.opensymphony.xwork2.Action
,com.opensymphony.xwork2.interceptor.ValidationAware
,com.opensymphony.xwork2.LocaleProvider
,com.opensymphony.xwork2.TextProvider
,com.opensymphony.xwork2.Validateable
,Serializable
- Direct Known Subclasses:
AbstractDatabaseCreationAction
,SetupDatasourceTestConnectionAction
,SetupDBChoiceAction
,SetupStandardDatabaseTestConnectionAction
public abstract class AbstractSetupDatabaseAction extends AbstractSetupAction
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DATASOURCE_PREFIX
protected ConfluenceDatabaseDetails
dbDetails
-
Fields inherited from class com.atlassian.confluence.setup.actions.AbstractSetupAction
DEMO_CONTENT_ZIP_FILE, SETUP_CLUSTER, SETUP_CLUSTER_TO_STANDALONE, SETUP_CONTENT_BLANK, SETUP_CONTENT_DEMO, SETUP_CONTENT_IMPORT, SETUP_CUSTOM, SETUP_DB_CLUSTER_CONN_TYPE, SETUP_DB_CONN_TYPE, SETUP_DB_DATASOURCE, SETUP_DB_EMBEDDED, SETUP_DB_STANDARD, SETUP_DB_TYPE_DATASOURCE, SETUP_DB_TYPE_STANDARD, SETUP_PATHS, SETUP_QUICK, SETUP_SESSION_ID_KEY, SETUP_SKIP_TO_NEXT_STEP, SETUP_SKIP_TO_NEXT_STEP_CLUSTER, SETUP_USER_INTERNAL, SETUP_USER_JAACS
-
Fields inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
accessModeService, CANCEL, DEVMODE, eventManager, i18NBeanFactory, labelManager, languageManager, LICENSE_EXPIRED, LICENSE_USERS_EXCEEDED, messageHolder, permissionManager, permitted, personService, pluginAccessor, PREVIEW, settingsManager, spacePermissionManager, systemInformationService, userAccessor, webInterfaceManager
-
-
Constructor Summary
Constructors Constructor Description AbstractSetupDatabaseAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkDatabaseURL(com.atlassian.config.db.DatabaseDetails dbDetails)
Validate prefix of Database URL.protected boolean
checkDriver(com.atlassian.config.db.DatabaseDetails dbDetails)
Checks if the given database driver can be resolved in classpath.protected DatabaseTestResult
convertBootstrapException(String databaseType, com.atlassian.config.bootstrap.BootstrapException e)
protected String
detectDatabaseType(Connection connection)
protected List<String>
findDatasourceNames()
Find the configured jndi datasourcesString
getDatabase()
ConfluenceDatabaseDetails
getDbConfigInfo()
com.atlassian.config.db.HibernateConfig
getHibernateConfig()
void
setDatabase(String database)
void
setDatabaseVerifier(DatabaseVerifier databaseVerifier)
void
setDbConfigInfo(ConfluenceDatabaseDetails dbDetails)
void
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
protected DatabaseTestResult
testConnection(String databaseType, Connection connection)
-
Methods inherited from class com.atlassian.confluence.setup.actions.AbstractSetupAction
bootstrapConfigurer, getBootstrapManager, getContainerManager, getLocale, getServerId, getSetupPersister, getSetupSessionId, getSingletonFromMainContext, getSupportEntitlementNumber, getXsrfToken, getXsrfTokenGenerator, isPermitted, performEarlyStartup, performLateStartup, retrieveSingletonFromMainContext, setBootstrapConfigurer, setBootstrapSidManager, setContainerManager, setLicenseService, setSetupPersister, setXsrfTokenGenerator, transitionFromColdToTenantedState, transitionFromColdToVacantState, transitionFromVacantToTenantedState
-
Methods inherited from class com.atlassian.confluence.core.ConfluenceActionSupport
addActionError, addActionMessage, addFieldError, addPermissionTypeTo, addToHistory, doDefault, formatFriendlyDate, getAccessMode, getActionName, getActionName, getAuthenticatedUser, getBootstrapStatusProvider, getCancel, getCancelResult, getConfluenceAccessManager, getContentUiSupport, getContext, getCurrentRequest, getCurrentSession, getDateFormatSetting, getDateFormatter, getDefaultResourceBundle, getDefaultTimeZone, getDocBean, getDocLink, getEventManager, getFriendlyDateFormatter, getFrontendServiceURL, getGlobalSettings, getHelper, getI18n, getInstalledLanguages, getLabelManager, getLanguageJs, getLanguageManager, getLanguageUserFriendly, getLocaleManager, getLocaleString, getMessageHolder, getNiceContentType, getPermissionManager, getPermissionTypes, getPermittedEntitiesOf, getPermittedEntitiesOf, getPermittedEntitiesOf, getPersonService, getPreviousLoginDate, getRemoteUser, getSession, getSystemInformationService, getText, getText, getText, getText, getText, getText, getText, getText, getTextStatic, getTextStatic, getTextStrict, getTimeZone, getUserAccessor, getUserByName, getUserFullName, getUserHasBrowseUsersPermission, getUserHasLicensedAccess, getUserInterfaceState, getUserLocaleDefaultDatePattern, getUserProfilePicUrl, getWebInterfaceContext, getWebInterfaceManager, hasPermissionForSpace, isAnonymousUser, isCanceled, isDevMode, isEmailVisible, isExternalUserManagementEnabled, isLabelable, isPrintableVersion, isSkipAccessCheck, isUserStatusPluginEnabled, isUsingH2, isUsingHSQL, setAccessModeService, setApiDateFormatService, setApiPersonService, setBootstrapManager, setBootstrapStatusProvider, setCancel, setConfluenceAccessManager, setContentUiSupport, setEventManager, setFormatSettingsManager, setI18NBean, setI18NBeanFactory, setLabelManager, setLanguageManager, setLocaleManager, setLoginManager, setMessageHolder, setPermissionManager, setPluginAccessor, setPreviousLoginDate, setServletRequestSupplier, setSettingsManager, setSpacePermissionManager, setSystemInformationService, setTimeZoneManager, setUserAccessor, setWebInterfaceManager, useSkipAccessCheck, withServletRequestSupplier
-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
-
-
-
-
Field Detail
-
DATASOURCE_PREFIX
protected static final String DATASOURCE_PREFIX
- See Also:
- Constant Field Values
-
dbDetails
protected ConfluenceDatabaseDetails dbDetails
-
-
Method Detail
-
getHibernateConfig
public com.atlassian.config.db.HibernateConfig getHibernateConfig()
-
setHibernateConfig
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
-
setDatabaseVerifier
public void setDatabaseVerifier(DatabaseVerifier databaseVerifier)
-
getDatabase
public String getDatabase()
-
setDatabase
public void setDatabase(String database)
-
detectDatabaseType
protected String detectDatabaseType(Connection connection) throws SQLException
- Throws:
SQLException
-
getDbConfigInfo
public ConfluenceDatabaseDetails getDbConfigInfo()
-
setDbConfigInfo
public void setDbConfigInfo(ConfluenceDatabaseDetails dbDetails)
-
checkDriver
protected boolean checkDriver(com.atlassian.config.db.DatabaseDetails dbDetails)
Checks if the given database driver can be resolved in classpath.- Parameters:
dbDetails
- database detail- Returns:
- whether the driver can be found
-
checkDatabaseURL
protected boolean checkDatabaseURL(com.atlassian.config.db.DatabaseDetails dbDetails)
Validate prefix of Database URL.- Parameters:
dbDetails
- database detail- Returns:
- whether DB URL can be valid
-
findDatasourceNames
protected List<String> findDatasourceNames()
Find the configured jndi datasources- Returns:
- a list of datasource names
-
testConnection
protected DatabaseTestResult testConnection(String databaseType, Connection connection)
-
convertBootstrapException
protected DatabaseTestResult convertBootstrapException(String databaseType, com.atlassian.config.bootstrap.BootstrapException e)
-
-