Package org.ow2.clif.util
Class ExecutionContext
- java.lang.Object
-
- org.ow2.clif.util.ExecutionContext
-
public abstract class ExecutionContext extends java.lang.ObjectThis class helps gathering configuration parameters to ease portability between several assemblies of CLIF. It also configures log libraries and system properties.- Author:
- Bruno Dillenseger, Florian Francheteau
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_MAXQ_PROPERTY_FILErelative path to the file holding MaxQ properties in console pluginstatic java.lang.StringDEFAULT_SERVERName of the default CLIF server possibly launched by a user interface for conveniencestatic java.lang.StringDEPLOY_RETRIES_PROP_DEFAULTstatic java.lang.StringDEPLOY_RETRIES_PROP_NAMEstatic java.lang.StringDEPLOY_RETRYDELAY_PROP_DEFAULTstatic java.lang.StringDEPLOY_RETRYDELAY_PROP_NAMEstatic java.lang.StringOPTS_PATHrelative path to the file holding CLIF optionsstatic java.lang.StringPREFETCH_FILErelative path to the file holding the list of classes to prefetch (including all dependencies)static java.lang.String[]PROPERTIES_WITH_PATHNames of CLIF system properties whose value is a pathstatic java.lang.StringPROPS_PATHrelative path to the file holding CLIF system propertiesstatic java.lang.StringWORKSPACE_PATHabsolute path to the workspace
-
Constructor Summary
Constructors Constructor Description ExecutionContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancodeServerIsShared()static booleandeploymentIsBestEffort()static java.lang.StringgetBaseDir()Gets the base directory of CLIF runtime environment.static longgetDeploymentTimeOut()static java.lang.StringgetMaxQPropFile()Gets location of maxq.properties file in current projectstatic voidinit(java.lang.String path)Sets the base directory of CLIF runtime environment, and configures log libraries.static voidsetMaxQPropFile(java.lang.String dir)Sets absolute location of maxq.properties file in current projectstatic voidsetProperties(java.io.InputStream ins)Sets system properties according to the contents of an input stream.static booleanuseGlobalTime()
-
-
-
Field Detail
-
DEPLOY_RETRIES_PROP_NAME
public static final java.lang.String DEPLOY_RETRIES_PROP_NAME
- See Also:
- Constant Field Values
-
DEPLOY_RETRIES_PROP_DEFAULT
public static final java.lang.String DEPLOY_RETRIES_PROP_DEFAULT
- See Also:
- Constant Field Values
-
DEPLOY_RETRYDELAY_PROP_NAME
public static final java.lang.String DEPLOY_RETRYDELAY_PROP_NAME
- See Also:
- Constant Field Values
-
DEPLOY_RETRYDELAY_PROP_DEFAULT
public static final java.lang.String DEPLOY_RETRYDELAY_PROP_DEFAULT
- See Also:
- Constant Field Values
-
DEFAULT_SERVER
public static final java.lang.String DEFAULT_SERVER
Name of the default CLIF server possibly launched by a user interface for convenience- See Also:
- Constant Field Values
-
DEFAULT_MAXQ_PROPERTY_FILE
public static final java.lang.String DEFAULT_MAXQ_PROPERTY_FILE
relative path to the file holding MaxQ properties in console plugin- See Also:
- Constant Field Values
-
PROPS_PATH
public static final java.lang.String PROPS_PATH
relative path to the file holding CLIF system properties- See Also:
- Constant Field Values
-
OPTS_PATH
public static final java.lang.String OPTS_PATH
relative path to the file holding CLIF options- See Also:
- Constant Field Values
-
PREFETCH_FILE
public static final java.lang.String PREFETCH_FILE
relative path to the file holding the list of classes to prefetch (including all dependencies)- See Also:
- Constant Field Values
-
WORKSPACE_PATH
public static java.lang.String WORKSPACE_PATH
absolute path to the workspace
-
PROPERTIES_WITH_PATH
public static java.lang.String[] PROPERTIES_WITH_PATH
Names of CLIF system properties whose value is a path
-
-
Method Detail
-
init
public static void init(java.lang.String path)
Sets the base directory of CLIF runtime environment, and configures log libraries.- Parameters:
path- the filesystem path to the base directory of CLIF runtime environment. Must have a trailing filesystem separator.
-
getBaseDir
public static java.lang.String getBaseDir()
Gets the base directory of CLIF runtime environment.- Returns:
- the base directory of CLIF runtime environment, or null if this directory has not been set.
-
setProperties
public static void setProperties(java.io.InputStream ins)
Sets system properties according to the contents of an input stream. The stream is read as a properties-formatted content, from which property clif.parameters is analyzed and transformed into system properties.- Parameters:
ins- input stream properties are read from
-
setMaxQPropFile
public static void setMaxQPropFile(java.lang.String dir)
Sets absolute location of maxq.properties file in current project- Parameters:
dir- absolute location of maxq.properties
-
getMaxQPropFile
public static java.lang.String getMaxQPropFile()
Gets location of maxq.properties file in current project- Returns:
- String the absolute path of maxq.properties
-
useGlobalTime
public static boolean useGlobalTime()
- Returns:
- true if CLIF can assume that a global time is maintained by some protocol such as Network Time Protocol, false otherwise.
-
deploymentIsBestEffort
public static boolean deploymentIsBestEffort()
- Returns:
- true if a test plan can be considered as successfully deployed event if some blades could not be deployed, false otherwise (i.e. all blades must be successfully deployed).
-
getDeploymentTimeOut
public static long getDeploymentTimeOut()
- Returns:
- the deployment time out setting, in ms
-
codeServerIsShared
public static boolean codeServerIsShared()
- Returns:
- true if a unique, shared code server must be used by all deployments, false otherwise (one code server per deployment).
-
-