|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bitmechanic.maxq.Config
public class Config
This singleton class stores all config information for MAXQ. Config data can be set through the maxq.properties file, or the command line.
Some people might think that this class is overkill, duplicating settings that need not be stored, etc. However those cynics should consider that this class is referred to in unit tests, and would also enable someone running MaxQ scripts from a JUnit test harness to modify options. Otherwise this would be impossible because the command-line would never be parsed.
Nested Class Summary | |
---|---|
static class |
Config.ProxySettings
This class represents the settings for the proxy *THAT MAXQ USES*. |
Method Summary | |
---|---|
void |
addPythonPath(java.lang.String path)
|
void |
completeInit()
Call this when all configuration options have been set. |
static Config |
getConfig()
|
static java.lang.String |
getDriverPkgName()
|
java.util.List |
getExcludePatterns()
|
java.lang.String |
getExist()
|
java.util.List |
getIncludePatterns()
|
int |
getPort()
|
java.lang.String |
getProperty(java.lang.String prop)
Returns null if the property is not found. |
java.lang.String |
getProperty(java.lang.String prop,
java.lang.String def)
Returns the string value of the property, or the given default if the property is missing or empty. |
java.lang.Integer |
getPropertyInt(java.lang.String prop)
Returns the property as an integer. |
Config.ProxySettings |
getProxySettings()
|
java.lang.String |
getPythonPath()
|
java.lang.String |
getReplace()
|
java.lang.String |
getScriptArg()
|
static org.apache.commons.logging.Log |
getTestLogger()
|
static java.lang.String |
getValidatorPkgName()
|
static void |
initConfig()
Set up the properties file from the properties.file system property, defaulting to maxq.properties if it exists. |
boolean |
isDebug()
|
boolean |
isQuiet()
|
void |
setDebug(boolean d)
|
void |
setExcludePatterns(java.lang.String[] pats)
|
void |
setExist(java.lang.String e)
|
void |
setIncludePatterns(java.lang.String[] pats)
|
void |
setPort(int pt)
|
void |
setProperty(java.lang.String property,
java.lang.String value)
|
void |
setProxySettings(Config.ProxySettings proxySettings)
|
void |
setQuiet(boolean q)
|
void |
setReplace(java.lang.String e)
|
void |
setScriptArg(java.lang.String arg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Config getConfig()
public static void initConfig()
public void completeInit() throws Utils.UserException
Utils.UserException
public java.lang.String getProperty(java.lang.String prop)
public java.lang.String getProperty(java.lang.String prop, java.lang.String def)
public void setProperty(java.lang.String property, java.lang.String value)
public java.lang.Integer getPropertyInt(java.lang.String prop) throws Utils.UserException
Utils.UserException
public void addPythonPath(java.lang.String path)
public java.lang.String getPythonPath()
public void setPort(int pt)
public int getPort()
public void setDebug(boolean d)
public boolean isDebug()
public void setQuiet(boolean q)
public boolean isQuiet()
public void setExist(java.lang.String e)
public java.lang.String getExist()
public void setReplace(java.lang.String e)
public java.lang.String getReplace()
public void setIncludePatterns(java.lang.String[] pats)
public void setExcludePatterns(java.lang.String[] pats)
public java.util.List getIncludePatterns()
public java.util.List getExcludePatterns()
public void setScriptArg(java.lang.String arg)
public java.lang.String getScriptArg()
public static java.lang.String getDriverPkgName()
public static java.lang.String getValidatorPkgName()
public static org.apache.commons.logging.Log getTestLogger()
public Config.ProxySettings getProxySettings()
public void setProxySettings(Config.ProxySettings proxySettings)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |