|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.utils.SystemProperty
public class SystemProperty
This class represents system properties as constants.
Field Summary | |
---|---|
static SystemProperty |
ANT_HOME
Location of ANT |
static SystemProperty |
BAMBOO_HOME_FROM_ENV
Location of Bamboo Home |
static SystemProperty |
DEFAULT_CVS_ROOT
Default CVS Root (CVS server!) |
static SystemProperty |
DEFAULT_P4_EXE
Default Perforce p4 executable |
static SystemProperty |
DEFAULT_PERFORCE_CLIENT
Default Perforce Client |
static SystemProperty |
DEFAULT_PERFORCE_PORT
Default Perforce Port (Perforce server!) |
static SystemProperty |
DEFAULT_PERFORCE_USER
Default Perforce User |
static SystemProperty |
MAVEN_HOME
Location of MAVEN |
static SystemProperty |
MAVEN2_HOME
Location of MAVEN 2 |
Constructor Summary | |
---|---|
|
SystemProperty(String property,
boolean mandatory)
Creates an instance containing the value of the given property - logs an error if it cannot be found |
protected |
SystemProperty(String property,
boolean mandatory,
Log logger)
Used in testing |
|
SystemProperty(String property,
String property2,
boolean mandatory)
|
Method Summary | |
---|---|
boolean |
exists()
|
protected static String |
getEnvironmentVariable(String variable,
boolean mandatory)
Obtain the specified environment variable. |
String |
getValue()
Obtain the value of this proprty |
boolean |
getValue(boolean defaultValue)
Obtain the boolean property value |
String |
getValue(String defaultValue)
Obtain the value of the property (returns the default value if the enviroment variable has not been defined. |
static boolean |
isBuildDisabled()
|
static void |
setBuildDisabled(boolean buildDisabled)
|
void |
setValue(String propertyValue)
So the setting can be set by a test |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final SystemProperty BAMBOO_HOME_FROM_ENV
public static final SystemProperty MAVEN_HOME
public static final SystemProperty MAVEN2_HOME
public static final SystemProperty ANT_HOME
public static final SystemProperty DEFAULT_CVS_ROOT
public static final SystemProperty DEFAULT_PERFORCE_PORT
public static final SystemProperty DEFAULT_PERFORCE_CLIENT
public static final SystemProperty DEFAULT_PERFORCE_USER
public static final SystemProperty DEFAULT_P4_EXE
Constructor Detail |
---|
public SystemProperty(String property, boolean mandatory)
property
- The property we're loading from the environmentmandatory
- Is the property mandatory or optional?public SystemProperty(String property, String property2, boolean mandatory)
protected SystemProperty(String property, boolean mandatory, Log logger)
property
- The property we're loading from the environmentmandatory
- Is the property mandatory or optional?logger
- The logger we're logging errors toMethod Detail |
---|
public static boolean isBuildDisabled()
public static void setBuildDisabled(boolean buildDisabled)
public String getValue()
public String getValue(String defaultValue)
defaultValue
- The default value, if the environment variable has not been defined
public boolean getValue(boolean defaultValue)
defaultValue
- The default value, if the environment variable has not been defined
protected static String getEnvironmentVariable(String variable, boolean mandatory)
variable
- The variable we requiremandatory
- Is this a mandatory property?
public void setValue(String propertyValue)
propertyValue
- The value required by the testpublic boolean exists()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |