org.rhq.enterprise.installer
Class ConfigurationBean

java.lang.Object
  extended by org.rhq.enterprise.installer.ConfigurationBean

public class ConfigurationBean
extends Object

Responsible for taking the settings the user selects in the installer window and saves them as the server's initial configuration.

Author:
John Mazzitelli, Jay Shaughnessy

Constructor Summary
ConfigurationBean()
           
 
Method Summary
 StartPageResults createDatabase()
           
 String getAdminConnectionUrl()
           
 String getAdminPassword()
           
 String getAdminUsername()
           
 List<PropertyItemWithValue> getConfiguration()
          Loads in the server's current configuration and returns all the settings.
 PropertyItemWithValue getConfigurationProperty(String propertyName)
          Loads in the server's current configuration and returns all the settings.
 List<PropertyItemWithValue> getDatabaseConfiguration()
          Loads in the server's current configuration and returns only the database related properties.
 String getDataDirectory()
           
 String getExistingSchemaOption()
           
 List<javax.faces.model.SelectItem> getExistingSchemaOptions()
           
 ServerInformation.Server getHaServer()
           
 String getHaServerName()
           
 String getLastCreate()
           
 String getLastError()
           
 String getLastTest()
           
 List<PropertyItemWithValue> getNonDatabaseConfiguration()
          Loads in the server's current configuration and returns all the settings except database related properties.
 PropertyItemWithValue getPropHaEndpointPort()
           
 PropertyItemWithValue getPropHaEndpointSecurePort()
           
 PropertyItemWithValue getPropHaServerName()
          To set the server name use setServerName()
 List<javax.faces.model.SelectItem> getRegisteredServerNames()
           
 String getSelectedRegisteredServerName()
           
 Boolean getShowAdvancedSettings()
           
 void initConfiguration()
           
 boolean isAutoinstallEnabled()
          Checks to see if the server has been preconfigured and should be auto-installed.
 boolean isDatabaseSchemaExist()
           
 boolean isInstallationSettingsConfigurable()
           
 boolean isKeepExistingSchema()
           
 boolean isRegisteredServers()
           
 Boolean isShowAdvancedSettings()
           
 StartPageResults save()
           
 StartPageResults saveEmbeddedMode()
           
 void setAdminConnectionUrl(String adminUrl)
           
 void setAdminPassword(String adminPassword)
           
 void setAdminUsername(String adminUsername)
           
 void setConfiguration(List<PropertyItemWithValue> newConfig)
           
 void setExistingSchemaOption(String existingSchemaOption)
           
 void setHaServer(ServerInformation.Server haServer)
           
 void setHaServerFromPropertiesOnly()
          This method will set the HA Server information based solely on the server configuration properties.
 void setHaServerName(String serverName)
           
 void setSelectedRegisteredServerName(String selectedRegisteredServerName)
           
 void setShowAdvancedSettings(Boolean showAdvancedSettings)
           
 StartPageResults showCreateDatabasePage()
           
 StartPageResults testConnection()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationBean

public ConfigurationBean()
Method Detail

getConfigurationProperty

public PropertyItemWithValue getConfigurationProperty(String propertyName)
Loads in the server's current configuration and returns all the settings. This only returns the property if it is a basic setting or the UI is showing advanced, too.

Returns:
the requested server setting

initConfiguration

public void initConfiguration()

getConfiguration

public List<PropertyItemWithValue> getConfiguration()
Loads in the server's current configuration and returns all the settings.

Returns:
current server settings

getNonDatabaseConfiguration

public List<PropertyItemWithValue> getNonDatabaseConfiguration()
Loads in the server's current configuration and returns all the settings except database related properties. This additionally strips out hidden properties too, so the caller will not see any of the hidden properties in the returned list.

Returns:
current server settings, minus database related settings and hidden settings.
See Also:
getDatabaseConfiguration(), getConfiguration()

getDatabaseConfiguration

public List<PropertyItemWithValue> getDatabaseConfiguration()
Loads in the server's current configuration and returns only the database related properties.

Returns:
current database settings
See Also:
getNonDatabaseConfiguration(), getConfiguration()

isAutoinstallEnabled

public boolean isAutoinstallEnabled()
Checks to see if the server has been preconfigured and should be auto-installed. If true is returned, the installer webapp should not be needed to install the server and the installer should immediately begin the installation process.

Returns:
true if auto-install should occur; false means the user needs to use the installer GUI before the installation can begin

setConfiguration

public void setConfiguration(List<PropertyItemWithValue> newConfig)

isShowAdvancedSettings

public Boolean isShowAdvancedSettings()

getShowAdvancedSettings

public Boolean getShowAdvancedSettings()

setShowAdvancedSettings

public void setShowAdvancedSettings(Boolean showAdvancedSettings)

getLastError

public String getLastError()

getLastTest

public String getLastTest()

getLastCreate

public String getLastCreate()

getAdminConnectionUrl

public String getAdminConnectionUrl()

setAdminConnectionUrl

public void setAdminConnectionUrl(String adminUrl)

getAdminUsername

public String getAdminUsername()

setAdminUsername

public void setAdminUsername(String adminUsername)

getAdminPassword

public String getAdminPassword()

setAdminPassword

public void setAdminPassword(String adminPassword)

testConnection

public StartPageResults testConnection()

showCreateDatabasePage

public StartPageResults showCreateDatabasePage()

createDatabase

public StartPageResults createDatabase()

getDataDirectory

public String getDataDirectory()

isDatabaseSchemaExist

public boolean isDatabaseSchemaExist()

getExistingSchemaOption

public String getExistingSchemaOption()

setExistingSchemaOption

public void setExistingSchemaOption(String existingSchemaOption)

isKeepExistingSchema

public boolean isKeepExistingSchema()

saveEmbeddedMode

public StartPageResults saveEmbeddedMode()

save

public StartPageResults save()

getExistingSchemaOptions

public List<javax.faces.model.SelectItem> getExistingSchemaOptions()

getPropHaServerName

public PropertyItemWithValue getPropHaServerName()
To set the server name use setServerName()


getPropHaEndpointPort

public PropertyItemWithValue getPropHaEndpointPort()

getPropHaEndpointSecurePort

public PropertyItemWithValue getPropHaEndpointSecurePort()

isRegisteredServers

public boolean isRegisteredServers()

isInstallationSettingsConfigurable

public boolean isInstallationSettingsConfigurable()

getRegisteredServerNames

public List<javax.faces.model.SelectItem> getRegisteredServerNames()

getSelectedRegisteredServerName

public String getSelectedRegisteredServerName()

setSelectedRegisteredServerName

public void setSelectedRegisteredServerName(String selectedRegisteredServerName)

getHaServerName

public String getHaServerName()

setHaServerName

public void setHaServerName(String serverName)

setHaServerFromPropertiesOnly

public void setHaServerFromPropertiesOnly()
                                   throws Exception
This method will set the HA Server information based solely on the server configuration properties. It does not rely on any database access. This is used by the auto-installation process - see AutoInstallServlet.

Throws:
Exception

getHaServer

public ServerInformation.Server getHaServer()

setHaServer

public void setHaServer(ServerInformation.Server haServer)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.