public class StdIoFunctions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
kMaxCauseLoggingDepth
The max depth to follow throwable causes to when logging them.
|
static java.lang.String |
kWorkflowDebuggerLogListenerKey |
static java.lang.String |
kWorkflowFieldInfoSourceKey |
Constructor and Description |
---|
StdIoFunctions() |
Modifier and Type | Method and Description |
---|---|
static void |
alert(java.lang.Object theObject)
Shows message to a user.
|
static java.lang.String |
args(java.lang.String theName,
java.lang.String theDefault)
Returns system property provided to the java application,
if property is not defined it returns provided default value or
null |
static java.lang.String |
encodeUrl(java.lang.String theUrl)
Encodes the specified URL to the
UTF-8 character encoding. |
static void |
exit(int code)
This method is still being developed.
|
static java.lang.String |
generateUUID()
Creates a UUID that probably isn't that Universally Unique.
|
static void |
log(java.lang.Object theObject,
java.lang.Object theScriptName)
Logs a message to the workflow log file at the info level.
|
static void |
logAtLevel(java.lang.Object theObject,
java.lang.Object theScriptName,
java.lang.String theLevel)
Logs a message to the workflow log file at the given level.
|
static void |
logAtLevelWithThrowable(java.lang.Object theObject,
java.lang.Object theScriptName,
java.lang.String theLevel,
java.lang.Object theThrowable)
Logs a message and a throwable to the workflow log file at the given level.
|
static void |
logWithThrowable(java.lang.Object theObject,
java.lang.Object theScriptName,
java.lang.Object theThrowable)
Logs a message and a throwable to the workflow log file at the info level
|
static void |
setNamespacePrefix(java.lang.String theUri,
java.lang.String thePrefix)
Sets the specified prefix to the specified URI.
|
static void |
sleep(int theMillis)
Sleep the thread using standard thread sleep
|
static void |
stderr(java.lang.Object theObject)
Prints a message to the workflow log file at the warning level.
|
static void |
stdout(java.lang.Object theObject)
Prints a message to the workflow log file at the info level.
|
static boolean |
validateDate(java.lang.String theFormat,
java.lang.String theValue)
Validates that the string matches the given date format.
|
static boolean |
validateNumber(java.lang.String theFormat,
java.lang.String theValue)
Validates that the string matches the given number format.
|
public static final int kMaxCauseLoggingDepth
public static final java.lang.String kWorkflowDebuggerLogListenerKey
public static final java.lang.String kWorkflowFieldInfoSourceKey
public static void exit(int code)
code
- the exit code.public static java.lang.String args(java.lang.String theName, java.lang.String theDefault)
null.
theName
- the name of the property.theDefault
- the default value if property is not defined.null.
public static void stdout(java.lang.Object theObject)
theObject
- message to log.public static void stderr(java.lang.Object theObject)
theObject
- message to log.public static void log(java.lang.Object theObject, java.lang.Object theScriptName)
theObject
- the message to log.theScriptName
- the name of the script that is logging.public static void logWithThrowable(java.lang.Object theObject, java.lang.Object theScriptName, java.lang.Object theThrowable)
theObject
- the message to logtheScriptName
- the name of the script that is loggingtheThrowable
- the throwablepublic static void logAtLevel(java.lang.Object theObject, java.lang.Object theScriptName, java.lang.String theLevel)
theObject
- the message to log.theScriptName
- the name of the script that is logging.theLevel
- the level to log at.public static void logAtLevelWithThrowable(java.lang.Object theObject, java.lang.Object theScriptName, java.lang.String theLevel, java.lang.Object theThrowable)
theObject
- the message to log.theScriptName
- the name of the script that is logging.theLevel
- the level to log at.theThrowable
- the throwablepublic static void alert(java.lang.Object theObject)
theObject
- message to show.public static boolean validateDate(java.lang.String theFormat, java.lang.String theValue)
formatString
is the string conforming SimpleTextFormat
specification.theFormat
- the format.theValue
- the date value.true
if string value is valid or false
if not.SimpleDateFormat
public static boolean validateNumber(java.lang.String theFormat, java.lang.String theValue)
formatString
is the string conforming DecimalFormat
specification.theFormat
- the format.theValue
- the number value.true
if string value is valid or false
if not.DecimalFormat
public static java.lang.String encodeUrl(java.lang.String theUrl)
UTF-8
character encoding.theUrl
- the URL to be encodedpublic static void setNamespacePrefix(java.lang.String theUri, java.lang.String thePrefix)
theUri
- the URI.thePrefix
- the prefix.public static java.lang.String generateUUID()
public static void sleep(int theMillis)
theMillis
- milliseconds to sleep forCopyright © 2017 MediaBeacon, Inc. All Rights Reserved.