com.dtolabs.launcher
Class Preferences

java.lang.Object
  extended by com.dtolabs.launcher.Preferences

public class Preferences
extends java.lang.Object

give us ability to set all framework/modules.* properties at the cmd line such as --framework.property.name=, which implies: framework.property.name= by generating a preferences.properties file that contains overridden values otherwise default values from new defaults file apply.


Field Summary
static java.lang.String ENV_JAVA_HOME
           
static java.lang.String JAVA_HOME
           
static java.lang.String RUNDECK_DEFAULTS_PROPERTIES_NAME
           
static java.lang.String SYSTEM_RDECK_BASE
           
static java.lang.String SYSTEM_RDECK_HOME
           
 
Constructor Summary
Preferences()
           
 
Method Summary
static java.lang.String forwardSlashPath(java.lang.String input)
           
static void generate(java.lang.String[] args, java.lang.String preferences, java.util.Properties inputProps)
          generate preferences file represented by preferences String
static void loadResourcesDefaults(java.util.Properties defaultProperties, java.lang.String propertiesFileName)
           
static void parseNonReqOptionsAsProperties(java.util.Properties defaultProperties, java.lang.String[] args)
          Parse arguments that match "--key=value" and populate the Properties with the values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_HOME

public static final java.lang.String JAVA_HOME

ENV_JAVA_HOME

public static final java.lang.String ENV_JAVA_HOME

SYSTEM_RDECK_HOME

public static final java.lang.String SYSTEM_RDECK_HOME

SYSTEM_RDECK_BASE

public static final java.lang.String SYSTEM_RDECK_BASE

RUNDECK_DEFAULTS_PROPERTIES_NAME

public static final java.lang.String RUNDECK_DEFAULTS_PROPERTIES_NAME
Constructor Detail

Preferences

public Preferences()
Method Detail

generate

public static void generate(java.lang.String[] args,
                            java.lang.String preferences,
                            java.util.Properties inputProps)
                     throws java.lang.Exception
generate preferences file represented by preferences String

Throws:
java.lang.Exception

loadResourcesDefaults

public static void loadResourcesDefaults(java.util.Properties defaultProperties,
                                         java.lang.String propertiesFileName)
                                  throws java.io.IOException
Throws:
java.io.IOException

parseNonReqOptionsAsProperties

public static void parseNonReqOptionsAsProperties(java.util.Properties defaultProperties,
                                                  java.lang.String[] args)
                                           throws java.lang.Exception
Parse arguments that match "--key=value" and populate the Properties with the values.

Parameters:
defaultProperties - the properties
args - the arguments
Throws:
java.lang.Exception - if an error occurs

forwardSlashPath

public static java.lang.String forwardSlashPath(java.lang.String input)