public class RuntimeParamUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AWS_FLAG
Config AWS end parameter switch: "-aws" |
static String |
BLJ_PROJ_DIR
Automatically added $BLJ_PROJ by biolockj script: "-projectDir"
|
static String |
CONFIG_FILE
Config file path runtime parameter switch: "-config" |
static String |
DEBUG_FLAG
Flag argument; if present, BioLockJ will set the
Conig property to DEBUG. |
static String |
DIRECT_MODE
Direct mode runtime parameter switch: "-direct"
|
static String |
DOCKER_FLAG
Flag argument; if present, BioLockJ will use a docker volume map.
|
static String |
DOCKER_MAPPER
Argument giving the name of the class to use for the DockerMountMapper: "-docker-mapper"
|
protected static String |
HOME_DIR
Automatically added $HOME by biolockj/dockblj script: "-homeDir"
|
static String |
PASSWORD
Change password runtime parameter switch: "-password"
|
static String |
PRECHECK_FLAG
Flag argument; if present, BioLockJ will stop after checkDependencies step.
|
static String |
RESTART_DIR
Restart pipeline runtime parameter switch: "-restartDir"
|
protected static String |
SYSTEM_OUT_FLAG
Flag argument; if present, BioLockJ will print to System.out instead of Log for debugging early runtime errors.
|
static String |
UNUSED_PROPS_FLAG
Flag argument; if presetn, BioLockJ will run check dependencies for ALL modules to determine unused properties from the primary config.
|
Constructor and Description |
---|
RuntimeParamUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
doChangePassword()
Return TRUE if runtime parameters indicate change password request
|
static boolean |
doRestart()
Return TRUE if runtime parameters indicate attempt to restart pipeline
|
static File |
get_BLJ_PROJ()
Runtime property getter for "-projectDir"
|
static File |
get_BLJ_PROJ(boolean dockerize) |
static String |
getAdminEmailPassword()
Runtime property getter for "-password"
|
static File |
getConfigFile()
Runtime property getter for "-config"
|
static File |
getConfigFile(boolean dockerize) |
static String |
getDirectModuleDir()
Runtime property getter for "-direct"
|
static File |
getDirectPipelineDir()
Runtime property getter for direct module pipeline directory
|
static String |
getDockerMapper() |
static File |
getFileParam(String paramName,
boolean dockerize)
Get a File that is given through a parameter; if in docker, get the in-container form of the path
|
static String |
getJavaModuleArgs(JavaModule module)
For cluster env, runtime params that need be forward to detached cluster Java modules.
|
static String |
getProjectName()
Deprecated.
Use
BioLockJ.getProjectName() instead |
static File |
getRestartDir()
Return restart pipeline directory
|
static File |
getRestartDir(boolean dockerize) |
static String |
getRuntimeArgs()
Return the runtime args as a String.
|
static boolean |
isAwsMode()
Return TRUE if runtime parameter "-aws" was found
|
static boolean |
isInDocker() |
static boolean |
isPrecheckAllMode() |
static boolean |
isPrecheckMode() |
static boolean |
isVerbose() |
static boolean |
logToSystemOut()
Return TRUE if runtime parameters indicate Logs should be written to system.out
|
static void |
printArgsDescriptions()
Print arg descriptions
TODO: PROBLEMATIC APPROACH TO SHOW ARGS BY PRINTING VARIABLES IN THIS METHOD
|
protected static void |
printRuntimeArgs(String[] args)
Print the runtime args to System.out or using the Logger based on useSysOut parameter.
|
static void |
registerRuntimeParameters(String[] args)
TODO: runtime params should always store the string as given on the command line,
and that should be the host-file path, even when running in docker.
|
static void |
validateParams() |
public static final String AWS_FLAG
Config
AWS end parameter switch: "-aws"public static final String BLJ_PROJ_DIR
public static final String DOCKER_MAPPER
public static final String CONFIG_FILE
Config
file path runtime parameter switch: "-config"public static final String DIRECT_MODE
protected static final String HOME_DIR
public static final String PASSWORD
public static final String RESTART_DIR
protected static final String SYSTEM_OUT_FLAG
DEBUG_FLAG
,
Constant Field Valuespublic static final String PRECHECK_FLAG
public static final String DEBUG_FLAG
Conig
property to DEBUG.
SYSTEM_OUT_FLAG
,
Constant Field Valuespublic static final String DOCKER_FLAG
public static final String UNUSED_PROPS_FLAG
public static boolean doChangePassword()
public static File getFileParam(String paramName, boolean dockerize) throws DockerVolCreationException
paramName
- - String key to use with paramsDockerVolCreationException
InterruptedException
IOException
public static boolean doRestart() throws DockerVolCreationException
DockerVolCreationException
public static File get_BLJ_PROJ() throws DockerVolCreationException
DockerVolCreationException
public static File get_BLJ_PROJ(boolean dockerize) throws DockerVolCreationException
DockerVolCreationException
public static String getAdminEmailPassword()
public static File getConfigFile() throws DockerVolCreationException
Config
fileDockerVolCreationException
public static File getConfigFile(boolean dockerize) throws DockerVolCreationException
DockerVolCreationException
public static String getDirectModuleDir()
public static File getDirectPipelineDir()
public static String getJavaModuleArgs(JavaModule module) throws DockerVolCreationException
module
- JavaModuleDockerVolCreationException
public static String getProjectName() throws Exception
BioLockJ.getProjectName()
insteadException
public static File getRestartDir() throws DockerVolCreationException
DockerVolCreationException
public static File getRestartDir(boolean dockerize) throws DockerVolCreationException
DockerVolCreationException
public static String getRuntimeArgs()
public static boolean isAwsMode()
public static boolean isPrecheckMode()
public static boolean isVerbose()
public static boolean isInDocker()
public static boolean isPrecheckAllMode()
public static boolean logToSystemOut()
public static void printArgsDescriptions()
public static void registerRuntimeParameters(String[] args) throws RuntimeParamException, DockerVolCreationException
Config
file path
args
- Program runtime parametersRuntimeParamException
- if invalid parameters foundDockerVolCreationException
protected static void printRuntimeArgs(String[] args)
args
- Runtime Argspublic static void validateParams() throws RuntimeParamException, DockerVolCreationException
public static String getDockerMapper()