org.rhq.enterprise.installer
Class ConfigurationBean

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

public class ConfigurationBean
extends java.lang.Object

Responisible 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()
           
 java.lang.String getAdminConnectionUrl()
           
 java.lang.String getAdminPassword()
           
 java.lang.String getAdminUsername()
           
 java.util.List<PropertyItemWithValue> getConfiguration()
          Loads in the server's current configuration and returns all the settings.
 PropertyItemWithValue getConfigurationProperty(java.lang.String propertyName)
          Loads in the server's current configuration and returns all the settings.
 java.util.List<PropertyItemWithValue> getDatabaseConfiguration()
          Loads in the server's current configuration and returns only the database related properties.
 java.lang.String getDataDirectory()
           
 java.lang.String getExistingSchemaOption()
           
 java.util.List<javax.faces.model.SelectItem> getExistingSchemaOptions()
           
 ServerInformation.Server getHaServer()
           
 java.lang.String getHaServerName()
           
 java.lang.String getLastCreate()
           
 java.lang.String getLastError()
           
 java.lang.String getLastTest()
           
 java.util.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()
 java.util.List<javax.faces.model.SelectItem> getRegisteredServerNames()
           
 java.lang.String getSelectedRegisteredServerName()
           
 java.lang.Boolean getShowAdvancedSettings()
           
 void initConfiguration()
           
 boolean isAutoinstallEnabled()
          Checks to see if the server has been preconfigured and should be auto-installed.
 boolean isDatabaseSchemaExist()
           
 boolean isKeepExistingSchema()
           
 boolean isRegisteredServers()
           
 java.lang.Boolean isShowAdvancedSettings()
           
 StartPageResults save()
           
 StartPageResults saveEmbeddedMode()
           
 void setAdminConnectionUrl(java.lang.String adminUrl)
           
 void setAdminPassword(java.lang.String adminPassword)
           
 void setAdminUsername(java.lang.String adminUsername)
           
 void setConfiguration(java.util.List<PropertyItemWithValue> newConfig)
           
 void setExistingSchemaOption(java.lang.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(java.lang.String serverName)
           
 void setSelectedRegisteredServerName(java.lang.String selectedRegisteredServerName)
           
 void setShowAdvancedSettings(java.lang.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(java.lang.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 java.util.List<PropertyItemWithValue> getConfiguration()
Loads in the server's current configuration and returns all the settings.

Returns:
current server settings

getNonDatabaseConfiguration

public java.util.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 java.util.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(java.util.List<PropertyItemWithValue> newConfig)

isShowAdvancedSettings

public java.lang.Boolean isShowAdvancedSettings()

getShowAdvancedSettings

public java.lang.Boolean getShowAdvancedSettings()

setShowAdvancedSettings

public void setShowAdvancedSettings(java.lang.Boolean showAdvancedSettings)

getLastError

public java.lang.String getLastError()

getLastTest

public java.lang.String getLastTest()

getLastCreate

public java.lang.String getLastCreate()

getAdminConnectionUrl

public java.lang.String getAdminConnectionUrl()

setAdminConnectionUrl

public void setAdminConnectionUrl(java.lang.String adminUrl)

getAdminUsername

public java.lang.String getAdminUsername()

setAdminUsername

public void setAdminUsername(java.lang.String adminUsername)

getAdminPassword

public java.lang.String getAdminPassword()

setAdminPassword

public void setAdminPassword(java.lang.String adminPassword)

testConnection

public StartPageResults testConnection()

showCreateDatabasePage

public StartPageResults showCreateDatabasePage()

createDatabase

public StartPageResults createDatabase()

getDataDirectory

public java.lang.String getDataDirectory()

isDatabaseSchemaExist

public boolean isDatabaseSchemaExist()

getExistingSchemaOption

public java.lang.String getExistingSchemaOption()

setExistingSchemaOption

public void setExistingSchemaOption(java.lang.String existingSchemaOption)

isKeepExistingSchema

public boolean isKeepExistingSchema()

saveEmbeddedMode

public StartPageResults saveEmbeddedMode()

save

public StartPageResults save()

getExistingSchemaOptions

public java.util.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()

getRegisteredServerNames

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

getSelectedRegisteredServerName

public java.lang.String getSelectedRegisteredServerName()

setSelectedRegisteredServerName

public void setSelectedRegisteredServerName(java.lang.String selectedRegisteredServerName)

getHaServerName

public java.lang.String getHaServerName()

setHaServerName

public void setHaServerName(java.lang.String serverName)

setHaServerFromPropertiesOnly

public void setHaServerFromPropertiesOnly()
                                   throws java.lang.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:
java.lang.Exception

getHaServer

public ServerInformation.Server getHaServer()

setHaServer

public void setHaServer(ServerInformation.Server haServer)


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