public class InstallerServiceImpl extends Object implements InstallerService
InstallerService.AlreadyInstalledException, InstallerService.AutoInstallDisabledException| Constructor and Description |
|---|
InstallerServiceImpl(InstallerConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
ArrayList<ServerDetails> |
getAllServerDetails(String connectionUrl,
String username,
String password)
Returns details on all servers that are registered in the database.
|
String |
getAppServerVersion()
Returns the version string for the app server itself (e.g.
|
String |
getInstallationResults()
Use this to determine if the server has already been completely installed or not.
|
String |
getOperatingSystem()
Returns the general type of operating system the server is running on (e.g.
|
ServerDetails |
getServerDetails(String connectionUrl,
String username,
String password,
String serverName)
Returns details on a specific server that is registered in the database.
|
ArrayList<String> |
getServerNames(String connectionUrl,
String username,
String password)
Returns a list of all registered servers in the database.
|
HashMap<String,String> |
getServerProperties()
Returns the rhq-server.properties values in a map.
|
void |
install(HashMap<String,String> serverProperties,
ServerDetails serverDetails,
String existingSchemaOption)
Starts the installation process.
|
boolean |
isDatabaseSchemaExist(String connectionUrl,
String username,
String password)
Tests to see if there is already a schema installed.
|
void |
listServers()
This simply logs a list of all known registered servers found in the database.
|
String |
obfuscatePassword(String clearTextPassword)
Given a database password, this will obfuscate it.
|
HashMap<String,String> |
preInstall()
Call this prior to installing to see if we are ready to install.
|
void |
prepareDatabase(HashMap<String,String> serverProperties,
ServerDetails serverDetails,
String existingSchemaOption)
Prepares the database.
|
boolean |
reconfigure(HashMap<String,String> serverProperties)
This will take server properties and reconfigure an already-installed server
with those values if the settings were previously hardcoded to old values (as opposed to being
set to expressions that allow them to be overridden with system property settings).
|
void |
test()
This simply verifies the server configuration but doesn't perform the actual install.
|
String |
testConnection(String connectionUrl,
String username,
String password)
Tests that the database can be connected to with the given URL and credentials.
|
public InstallerServiceImpl(InstallerConfiguration config)
public String obfuscatePassword(String clearTextPassword) throws Exception
InstallerServiceobfuscatePassword in interface InstallerServiceclearTextPassword - the password to obfuscateExceptionpublic void listServers()
throws Exception
InstallerServicelistServers in interface InstallerServiceExceptionpublic void test()
throws InstallerService.AutoInstallDisabledException,
InstallerService.AlreadyInstalledException,
Exception
InstallerServicetest in interface InstallerServiceInstallerService.AutoInstallDisabledException - if the server configuration properties does not have auto-install enabledInstallerService.AlreadyInstalledException - if it appears the installer was already run and the server is fully installedException - some other exception that should disallow the installation from continuingpublic HashMap<String,String> preInstall() throws InstallerService.AutoInstallDisabledException, InstallerService.AlreadyInstalledException, Exception
InstallerServicepreInstall in interface InstallerServiceInstallerService.install(HashMap, ServerDetails, String).InstallerService.AutoInstallDisabledException - if the server configuration properties does not have auto-install enabledInstallerService.AlreadyInstalledException - if it appears the installer was already run and the server is fully installedException - some other exception that should disallow the installation from continuingpublic String getInstallationResults() throws Exception
InstallerServicegetInstallationResults in interface InstallerServiceException - if it cannot be determined if the server has been fully installed.public void install(HashMap<String,String> serverProperties, ServerDetails serverDetails, String existingSchemaOption) throws InstallerService.AutoInstallDisabledException, InstallerService.AlreadyInstalledException, Exception
InstallerServiceinstall in interface InstallerServiceserverProperties - the server's settings to use. These will be persisted to
the server's .properties file.serverDetails - details on the server being installed.
If in auto-install mode, this value is ignored and can be anything.existingSchemaOption - if not in auto-install mode, this tells the installer what to do with any
existing schema. Must be one of the names of the
ServerInstallUtil.ExistingSchemaOption enum.
If in auto-install mode, this value is ignored and can be anything.InstallerService.AutoInstallDisabledException - if the server configuration properties does not have auto-install enabledInstallerService.AlreadyInstalledException - if it appears the installer was already run and the server is fully installedException - some other exception that should disallow the installation from continuingpublic void prepareDatabase(HashMap<String,String> serverProperties, ServerDetails serverDetails, String existingSchemaOption) throws Exception
InstallerServiceprepareDatabase in interface InstallerServiceserverProperties - the server's settings to use. These will be persisted to
the server's .properties file.serverDetails - details on the server being installed.
If in auto-install mode, this value is ignored and can be anything.existingSchemaOption - if not in auto-install mode, this tells the installer what to do with any
existing schema. Must be one of the names of the
ServerInstallUtil.ExistingSchemaOption enum.
If in auto-install mode, this value is ignored and can be anything.Exception - failed to successfully prepare the databasepublic ArrayList<String> getServerNames(String connectionUrl, String username, String password)
InstallerServicegetServerNames in interface InstallerServicepublic ArrayList<ServerDetails> getAllServerDetails(String connectionUrl, String username, String password)
InstallerServicegetAllServerDetails in interface InstallerServicepublic ServerDetails getServerDetails(String connectionUrl, String username, String password, String serverName)
InstallerServicegetServerDetails in interface InstallerServiceserverName - the name of the server whose details are to be retrievedpublic boolean isDatabaseSchemaExist(String connectionUrl, String username, String password)
InstallerServiceisDatabaseSchemaExist in interface InstallerServicetrue if there appears to be a schema installed in the database already.public String testConnection(String connectionUrl, String username, String password)
InstallerServicetestConnection in interface InstallerServicenull if the connection succeeded; this will be an error message if failedpublic HashMap<String,String> getServerProperties() throws Exception
InstallerServicegetServerProperties in interface InstallerServiceExceptionpublic boolean reconfigure(HashMap<String,String> serverProperties) throws Exception
InstallerServicereconfigure in interface InstallerServiceserverProperties - the new server propertiesExceptionpublic String getAppServerVersion() throws Exception
InstallerServicegetAppServerVersion in interface InstallerServiceExceptionpublic String getOperatingSystem() throws Exception
InstallerServicegetOperatingSystem in interface InstallerServiceExceptionCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.