public class ELConstantsFunctions extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
GB
GigaByte constant (1024 MB).
|
static long |
KB
KiloByte constant (1024).
|
static long |
MB
MegaByte constant (1024 KB).
|
static long |
PB
PetaByte constant (1024 TB).
|
static int |
SUBMIT_DAYS |
static int |
SUBMIT_HOURS |
static int |
SUBMIT_MINUTES |
static long |
TB
TeraByte constant (1024 GB).
|
| Constructor and Description |
|---|
ELConstantsFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
appendAll(java.lang.String src,
java.lang.String append,
java.lang.String delimeter)
Add the
append string into each splitted sub-strings of the
first string ('src'). |
static java.lang.String |
concat(java.lang.String s1,
java.lang.String s2)
Return the concatenation of 2 strings.
|
static java.lang.Object |
firstNotNull(java.lang.Object o1,
java.lang.Object o2)
Return the first not
null value, or null if both are null. |
static java.lang.String |
replaceAll(java.lang.String src,
java.lang.String regex,
java.lang.String replacement)
Replace each occurrence of regular expression match in the first string
with the
replacement string. |
static java.lang.String |
timestamp()
Return the current datetime in ISO8601 using Oozie processing timezone, yyyy-MM-ddTHH:mmZ.
|
static java.lang.String |
toConfigurationStr(java.util.Map<java.lang.String,java.lang.String> map) |
static java.lang.String |
toJsonStr(java.util.Map<java.lang.String,java.lang.String> map) |
static java.lang.String |
toPropertiesStr(java.util.Map<java.lang.String,java.lang.String> map) |
static java.lang.String |
trim(java.lang.String input) |
static java.lang.String |
urlEncode(java.lang.String input)
Translates a string into
application/x-www-form-urlencoded format using UTF-8 encoding scheme. |
public static final long KB
public static final long MB
public static final long GB
public static final long TB
public static final long PB
public static final int SUBMIT_MINUTES
public static final int SUBMIT_HOURS
public static final int SUBMIT_DAYS
public ELConstantsFunctions()
public static java.lang.Object firstNotNull(java.lang.Object o1, java.lang.Object o2)
null value, or null if both are null. Defined for EL
as 'Object firstNotNull(Object, Object)'.o1 - first value.o2 - second value.null value, or or null if both are nullpublic static java.lang.String concat(java.lang.String s1, java.lang.String s2)
null value is considered as an empty
string.s1 - first string.s2 - second string.s1 and s2.public static java.lang.String replaceAll(java.lang.String src, java.lang.String regex, java.lang.String replacement)
replacement string. This EL function utilizes the
java String class replaceAll method. For more details please see
http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)src - source string.regex - the regular expression to which this string is to be
matched. null means no replacement.replacement - - the string to be substituted for each match. If
null, it will considered as ""public static java.lang.String appendAll(java.lang.String src, java.lang.String append, java.lang.String delimeter)
append string into each splitted sub-strings of the
first string ('src'). The split is performed into src string
using the delimiter. E.g.
appendAll("/a/b/,/c/b/,/c/d/", "ADD", ",") will return
"/a/b/ADD,/c/b/ADD,/c/d/ADD"src - source string.append - - the string to be appended for each match. If null, it
will considered as ""delimeter - the string that is used to split the 'src' into
substring before the append. null means no append.public static java.lang.String trim(java.lang.String input)
input - string to be trimmednullpublic static java.lang.String timestamp()
public static java.lang.String urlEncode(java.lang.String input)
application/x-www-form-urlencoded format using UTF-8 encoding scheme. Bytes
for unsafe characters are also obtained using UTF-8 scheme.input - string to be encodedStringpublic static java.lang.String toJsonStr(java.util.Map<java.lang.String,java.lang.String> map)
public static java.lang.String toPropertiesStr(java.util.Map<java.lang.String,java.lang.String> map)
public static java.lang.String toConfigurationStr(java.util.Map<java.lang.String,java.lang.String> map)
Copyright © 2018 Apache Software Foundation. All Rights Reserved.