fedora.utilities.install
Class InstallOptions

java.lang.Object
  extended by fedora.utilities.install.InstallOptions

public class InstallOptions
extends java.lang.Object


Field Summary
static java.lang.String APIA_AUTH_REQUIRED
           
static java.lang.String APIA_SSL_REQUIRED
           
static java.lang.String APIM_SSL_REQUIRED
           
static java.lang.String DATABASE
           
static java.lang.String DATABASE_DRIVER
           
static java.lang.String DATABASE_DRIVERCLASS
           
static java.lang.String DATABASE_JDBCURL
           
static java.lang.String DATABASE_PASSWORD
           
static java.lang.String DATABASE_UPDATE
           
static java.lang.String DATABASE_USERNAME
           
static java.lang.String DEFAULT
           
static java.lang.String DEPLOY_LOCAL_SERVICES
           
static java.lang.String EXISTING_TOMCAT
           
static java.lang.String FEDORA_ADMIN_PASS
           
static java.lang.String FEDORA_HOME
           
static java.lang.String FEDORA_SERVERHOST
           
static java.lang.String INCLUDED
           
static java.lang.String INSTALL_CLIENT
           
static java.lang.String INSTALL_QUICK
           
static java.lang.String INSTALL_TYPE
           
static java.lang.String KEYSTORE_FILE
           
static java.lang.String KEYSTORE_PASSWORD
           
static java.lang.String KEYSTORE_TYPE
           
static java.lang.String MCKOI
           
static java.lang.String MYSQL
           
static java.lang.String ORACLE
           
static java.lang.String OTHER
           
static java.lang.String POSTGRESQL
           
static java.lang.String SERVLET_ENGINE
           
static java.lang.String SSL_AVAILABLE
           
static java.lang.String TOMCAT_HOME
           
static java.lang.String TOMCAT_HTTP_PORT
           
static java.lang.String TOMCAT_SHUTDOWN_PORT
           
static java.lang.String TOMCAT_SSL_PORT
           
static java.lang.String UNATTENDED
           
static java.lang.String USING_JBOSS
           
static java.lang.String XACML_ENABLED
           
 
Constructor Summary
InstallOptions(Distribution dist)
          Initialize options interactively, via input from the console.
InstallOptions(Distribution dist, java.util.Map<java.lang.Object,java.lang.Object> map)
          Initialize options from the given map of String values, keyed by option id.
 
Method Summary
 void dump(java.io.OutputStream out)
          Dump all options (including any defaults that were applied) to the given stream, in java properties file format.
 boolean getBooleanValue(java.lang.String name, boolean defaultValue)
          Get the value of the given option as a boolean, or the given default value if unspecified.
 int getIntValue(java.lang.String name, int defaultValue)
          Get the value of the given option as an integer, or the given default value if unspecified.
 java.util.Iterator getOptionNames()
          Get an iterator of the names of all specified options.
 java.lang.String getValue(java.lang.String name)
          Get the value of the given option, or null if it doesn't exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTALL_TYPE

public static final java.lang.String INSTALL_TYPE
See Also:
Constant Field Values

FEDORA_HOME

public static final java.lang.String FEDORA_HOME
See Also:
Constant Field Values

FEDORA_SERVERHOST

public static final java.lang.String FEDORA_SERVERHOST
See Also:
Constant Field Values

APIA_AUTH_REQUIRED

public static final java.lang.String APIA_AUTH_REQUIRED
See Also:
Constant Field Values

SSL_AVAILABLE

public static final java.lang.String SSL_AVAILABLE
See Also:
Constant Field Values

APIA_SSL_REQUIRED

public static final java.lang.String APIA_SSL_REQUIRED
See Also:
Constant Field Values

APIM_SSL_REQUIRED

public static final java.lang.String APIM_SSL_REQUIRED
See Also:
Constant Field Values

SERVLET_ENGINE

public static final java.lang.String SERVLET_ENGINE
See Also:
Constant Field Values

USING_JBOSS

public static final java.lang.String USING_JBOSS
See Also:
Constant Field Values

TOMCAT_HOME

public static final java.lang.String TOMCAT_HOME
See Also:
Constant Field Values

FEDORA_ADMIN_PASS

public static final java.lang.String FEDORA_ADMIN_PASS
See Also:
Constant Field Values

TOMCAT_SHUTDOWN_PORT

public static final java.lang.String TOMCAT_SHUTDOWN_PORT
See Also:
Constant Field Values

TOMCAT_HTTP_PORT

public static final java.lang.String TOMCAT_HTTP_PORT
See Also:
Constant Field Values

TOMCAT_SSL_PORT

public static final java.lang.String TOMCAT_SSL_PORT
See Also:
Constant Field Values

KEYSTORE_FILE

public static final java.lang.String KEYSTORE_FILE
See Also:
Constant Field Values

KEYSTORE_PASSWORD

public static final java.lang.String KEYSTORE_PASSWORD
See Also:
Constant Field Values

KEYSTORE_TYPE

public static final java.lang.String KEYSTORE_TYPE
See Also:
Constant Field Values

DATABASE

public static final java.lang.String DATABASE
See Also:
Constant Field Values

DATABASE_DRIVER

public static final java.lang.String DATABASE_DRIVER
See Also:
Constant Field Values

DATABASE_JDBCURL

public static final java.lang.String DATABASE_JDBCURL
See Also:
Constant Field Values

DATABASE_DRIVERCLASS

public static final java.lang.String DATABASE_DRIVERCLASS
See Also:
Constant Field Values

DATABASE_USERNAME

public static final java.lang.String DATABASE_USERNAME
See Also:
Constant Field Values

DATABASE_PASSWORD

public static final java.lang.String DATABASE_PASSWORD
See Also:
Constant Field Values

XACML_ENABLED

public static final java.lang.String XACML_ENABLED
See Also:
Constant Field Values

DEPLOY_LOCAL_SERVICES

public static final java.lang.String DEPLOY_LOCAL_SERVICES
See Also:
Constant Field Values

UNATTENDED

public static final java.lang.String UNATTENDED
See Also:
Constant Field Values

DATABASE_UPDATE

public static final java.lang.String DATABASE_UPDATE
See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
See Also:
Constant Field Values

INSTALL_QUICK

public static final java.lang.String INSTALL_QUICK
See Also:
Constant Field Values

INSTALL_CLIENT

public static final java.lang.String INSTALL_CLIENT
See Also:
Constant Field Values

INCLUDED

public static final java.lang.String INCLUDED
See Also:
Constant Field Values

MCKOI

public static final java.lang.String MCKOI
See Also:
Constant Field Values

MYSQL

public static final java.lang.String MYSQL
See Also:
Constant Field Values

ORACLE

public static final java.lang.String ORACLE
See Also:
Constant Field Values

POSTGRESQL

public static final java.lang.String POSTGRESQL
See Also:
Constant Field Values

OTHER

public static final java.lang.String OTHER
See Also:
Constant Field Values

EXISTING_TOMCAT

public static final java.lang.String EXISTING_TOMCAT
See Also:
Constant Field Values
Constructor Detail

InstallOptions

public InstallOptions(Distribution dist,
                      java.util.Map<java.lang.Object,java.lang.Object> map)
               throws OptionValidationException
Initialize options from the given map of String values, keyed by option id.

Throws:
OptionValidationException

InstallOptions

public InstallOptions(Distribution dist)
               throws InstallationCancelledException
Initialize options interactively, via input from the console.

Throws:
InstallationCancelledException
Method Detail

dump

public void dump(java.io.OutputStream out)
          throws java.io.IOException
Dump all options (including any defaults that were applied) to the given stream, in java properties file format. The output stream remains open after this method returns.

Throws:
java.io.IOException

getValue

public java.lang.String getValue(java.lang.String name)
Get the value of the given option, or null if it doesn't exist.


getIntValue

public int getIntValue(java.lang.String name,
                       int defaultValue)
                throws java.lang.NumberFormatException
Get the value of the given option as an integer, or the given default value if unspecified.

Throws:
java.lang.NumberFormatException - if the value is specified, but cannot be parsed as an integer.

getBooleanValue

public boolean getBooleanValue(java.lang.String name,
                               boolean defaultValue)
Get the value of the given option as a boolean, or the given default value if unspecified. If specified, the value is assumed to be true if given as "true", regardless of case. All other values are assumed to be false.


getOptionNames

public java.util.Iterator getOptionNames()
Get an iterator of the names of all specified options.