...
Code Block | ||
---|---|---|
| ||
pipeline: - log: message: "The current date is: #{@date.now()}" |
@calc
...
Provides utility functions inside a pipeline expression for simple calculations of lists.
You can access the functions declared here in the PEL using <code>@calc</code>
Note: This is a public interface. Methods exposed here can be accessed by external developers in the pipelines!
...
bigdecimal
- The sum of the given list.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list of numbers to sum-up. |
Example
Code Block |
---|
@calc.sum(list) |
...
bigdecimal
- The calculated AVG.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list of numbers. |
Example
Code Block |
---|
@calc.avg(list) |
...
bigdecimal
- The rounded value as BigDecimal.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to round. BigDecimal, double, float, integer and long are supported. |
cale | | `integer`` | | he scale to round to. Positive value scales in fraction part, negative in integer. |
ode | | `string`` | | ne of UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UNNECESSARY can be used. For details see https://docs.oracle.com/javase/7/docs/api/java/math/RoundingMode.html |
Example
Code Block |
---|
@calc.round(value,scale,mode) |
...
bigdecimal
- The rounded value as BigDecimal.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to round. BigDecimal, double, float, integer and long are supported. |
cale | | `integer`` | | he scale to round to. Positive value scales in fraction part, negative in integer. |
Example
Code Block |
---|
@calc.roundUp(value,scale) |
...
bigdecimal
- The rounded value as BigDecimal.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to round. BigDecimal, double, float, integer and long are supported. |
cale | | `integer`` | | he scale to round to. Positive value scales in fraction part, negative in integer. |
Example
Code Block |
---|
@calc.roundDown(value,scale) |
...
contentcollection
- A content collection with given uris.
Parameters
Name | Type | Description |
---|---|---|
ris | | `string`` | | he list of content uris to add to the new collection. |
Example
Code Block |
---|
@content.newCollection(uris) |
...
icontent
- The new content object.
Parameters
Name | Type | Description |
---|---|---|
ri | | `string`` | | he uri to be used for the content object |
Example
Code Block |
---|
@content.newContent(uri) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
ase64String | | `string`` | | he base64 string. |
Example
Code Block |
---|
@content.fromBase64(base64String) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
ase64String | | `string`` | | he base64 string. |
ame | | `string`` | | he name of the content object (= file name) |
Example
Code Block |
---|
@content.fromBase64(base64String,name) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
ase64String | | `string`` | | he base64 string. |
ame | | `string`` | | he name of the content object (= file name) |
ontentType | | `string`` | | he content type of the base64 encoded string (when converted back). |
Example
Code Block |
---|
@content.fromBase64(base64String,name,contentType) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
ontentType | | `string`` | | he content type to be set on the content object. |
ontentEncoding | | `string`` | | he encoding to be set on the content object. |
ame | | `string`` | | he name to be set on the content object. |
Example
Code Block |
---|
@content.from(object,contentType,contentEncoding,name) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
ame | | `string`` | | he name to be set on the content object. |
Example
Code Block |
---|
@content.from(object,name) |
...
icontent
- The content object.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
Example
Code Block |
---|
@content.from(object) |
...
string
- The encoded string.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to encode. |
Example
Code Block |
---|
@convert.toBase64(value) |
...
string
- The decoded string.
Parameters
Name | Type | Description |
---|---|---|
ase64String | | `string`` | | he base64 encoded string. |
Example
Code Block |
---|
@convert.fromBase64(base64String) |
...
byte[]
- The decoded string as byte array.
Parameters
Name | Type | Description |
---|---|---|
ase64String | | `string`` | | he base64 encoded string. |
Example
Code Block |
---|
@convert.fromBase64ToBytes(base64String) |
...
jsonnode
- The resulting JSON.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
Example
Code Block |
---|
@convert.toJson(object) |
...
string
- The resulting XML string.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
Example
Code Block |
---|
@convert.toXMLString(object) |
...
document
- The resulting DOM tree.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
Example
Code Block |
---|
@convert.toDOM(object) |
...
map
- The converted map structure or null in case input was null.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert to a map structure. |
Example
Code Block |
---|
@convert.toMap(object) |
...
object
- The converted map or list structure or null in case input was null.
Parameters
Name | Type | Description |
---|---|---|
| | `object`` | | he object to convert to a map or list structure. |
Example
Code Block |
---|
@convert.toMapOrList(o) |
...
object
- The lazy uri map.
Parameters
Name | Type | Description |
---|---|---|
ri | | `string`` | | he uri to load from. |
Example
Code Block |
---|
@convert.lazy(uri) |
...
long
- The converted long value or null in case the input was null.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value object to convert to long. |
Example
Code Block |
---|
@convert.toLong(value) |
...
integer
- The converted integer value or null in case the input was null.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value object to convert to integer. |
Example
Code Block |
---|
@convert.toInteger(value) |
...
boolean
- The converted boolean value.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value object to convert to boolean. |
Example
Code Block |
---|
@convert.toBoolean(value) |
...
double
- The decimal number as double.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to convert. |
Example
Code Block |
---|
@convert.toDecimal(value) |
...
bigdecimal
- The value as decimal number ready for calculations.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to convert to decimal. |
ecimalSymbol | | `string`` | | he decimal symbol to be used. Can be a comma , a dot . or a locale tag like de, en, fr for example. If null or empty, the locale tag of the currently logged-in user is used. If this is null, locale tag de is used as default. |
Example
Code Block |
---|
@convert.toDecimal(value,decimalSymbol) |
...
bigdecimal
- The value as decimal number ready for calculations.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to convert to decimal. |
attern | | `string`` | | he decimal pattern to apply. For example: #.### |
ecimalSymbol | | `string`` | | he decimal symbol to be used. Can be a comma , a dot . or a locale tag like de, en, fr for example. If null or empty, the locale tag of the currently logged-in user is used. If this is null, locale tag de is used as default. |
Example
Code Block |
---|
@convert.toDecimal(value,pattern,decimalSymbol) |
...
string
- The decimal string.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he decimal number to format to a string. |
attern | | `string`` | | he decimal pattern like #.## for example. |
ecimalSymbol | | `string`` | | he decimal symbol to be used. Can be a comma , a dot . or a locale tag like de, en, fr for example. If null or empty, the locale tag of the currently logged-in user is used. If this is null, locale tag de is used as default. |
Example
Code Block |
---|
@convert.toDecimalString(value,pattern,decimalSymbol) |
...
string
- The decimal string.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he decimal number to format to a string. |
ecimalSymbol | | `string`` | | he decimal symbol to be used. Can be a comma , a dot . or a locale tag like de, en, fr for example. If null or empty, the locale tag of the currently logged-in user is used. If this is null, locale tag de is used as default. |
Example
Code Block |
---|
@convert.toDecimalString(value,decimalSymbol) |
...
byte[]
- The byte array.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he object to convert. |
Example
Code Block |
---|
@convert.toByteArray(object) |
...
object
- The data object with value set at the specific path.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data object. |
ath | | `string`` | | he path inside the data object to set the value. |
alue | | `object`` | | he value to set. |
Example
Code Block |
---|
@data.set(data,path,value) |
...
object
- The map like data structure with the new entry added.
Parameters
Name | Type | Description |
---|---|---|
ap | | `object`` | | he map-like data structure. |
ey | | `object`` | | he key to add the value under. |
alue | | `object`` | | he value to add. |
Example
Code Block |
---|
@data.put(map,key,value) |
...
object
- The extracted data.
Parameters
Name | Type | Description |
---|---|---|
nput | | `object`` | | he input to apply the selection strings on. May not be null. |
elections | | `string`` | | ne or more selection strings. If null or empty, returns an empty map. |
Example
Code Block |
---|
@data.select(input,selections) |
...
list<integer>
- A list of given size filled-up with digits.
Parameters
Name | Type | Description |
---|---|---|
tartInt | | `int`` | | he start index to fill the list. |
ndInt | | `int`` | | he end index to fill the list up to. |
Example
Code Block |
---|
@data.integerList(startInt,endInt) |
...
long
- The size of the value. Returns a size of 0 in case the input value is null or cannot be counted.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | he value to count for size. |
Example
Code Block |
---|
@data.size(value) |
...
boolean
- true in case the given list is null or empty.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data structure to check. |
Example
Code Block |
---|
@data.isEmpty(data) |
...
boolean
- true in case the data object has given attribute.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data object to scan for attribute. |
ttribute | | `string`` | | he attribute name to search for. |
Example
Code Block |
---|
@data.has(data,attribute) |
...
object
- The value from given data with given attribute name.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to read the value from. |
ttribute | | `string`` | | he attribute name to read from the data. |
Example
Code Block |
---|
@data.get(data,attribute) |
...
list<string>
- The list of key of this object.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | key value structure. |
Example
Code Block |
---|
@data.keys(data) |
...
string
- The type of the data. Never null.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check the type for. |
Example
Code Block |
---|
@data.type(data) |
...
boolean
- True in case the given data is of given type.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for the type. |
ype | | `string`` | | he type string to check for. |
Example
Code Block |
---|
@data.isType(data,type) |
...
boolean
- true, if data is an array.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isArray(data) |
...
boolean
- true, if data is a boolean.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isBoolean(data) |
...
boolean
- true, if data is a number.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isNumber(data) |
...
boolean
- true, if data is an object.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isObject(data) |
...
boolean
- true, if data is a string.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isString(data) |
...
boolean
- true, if data is null.
Parameters
Name | Type | Description |
---|---|---|
ata | | `object`` | | he data to check for. |
Example
Code Block |
---|
@data.isNull(data) |
...
string
- A formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
ormat | | `string`` | | he format pattern like dd.MM.YY HH:mm:ss for example. |
Example
Code Block |
---|
@date.now(format) |
...
string
- The formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
oneId | | `string`` | | he zoneId to be used. See http://www.iana.org/time-zones for official reference of these names. |
ocale | | `string`` | | he locale to be used. |
Example
Code Block |
---|
@date.now(zoneId,locale) |
...
string
- The formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
ateTimeString | | `string`` | | he date-time string as input. |
utputFormat | | `string`` | | he output format pattern. Must comply with https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. |
Example
Code Block |
---|
@date.guessAndFormat(dateTimeString,outputFormat) |
...
string
- The formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
nputDate | | `string`` | | he input date string. |
nputFormat | | `string`` | | he input format pattern. Must comply with https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. |
utputFormat | | `string`` | | he output format pattern. Must comply with https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. |
Example
Code Block |
---|
@date.format(inputDate,inputFormat,outputFormat) |
...
string
- The formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
so8601Date | | `string`` | | he ISO-8061 formatted date to convert. |
ormat | | `string`` | | he format pattern. Must comply with https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. |
Example
Code Block |
---|
@date.format(iso8601Date,format) |
...
string
- The formatted date time string.
Parameters
Name | Type | Description |
---|---|---|
imestamp | | `long`` | | he unix timestamp in millis to format. |
ormat | | `string`` | | he format pattern. Must comply with https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html. |
Example
Code Block |
---|
@date.format(timestamp,format) |
...
string
- The guessed year from the given string like 2012 for example.
Parameters
Name | Type | Description |
---|---|---|
ateString | | `string`` | | date string like 31.02.2012, 31.02.12, 2012/01/31, 31-01-12, 31-01-2012, 2012-01-31 23:59:59, or 2001-07-04T12:08:56.235-0700. |
Example
Code Block |
---|
@date.year(dateString) |
...
boolean
- true, if the given amount of time is already expired.
Parameters
Name | Type | Description |
---|---|---|
so8601Start | | `object`` | | he start time for the time range in ISO-8601 format. |
so8601End | | `object`` | | he endtime for the time range in ISO-8601 format. |
xpiredInPercents | | `float`` | | he percentage as float (e.g. 0,9 = 90%), the range is already expired. |
Example
Code Block |
---|
@date.isExpired(iso8601Start,iso8601End,expiredInPercents) |
...
boolean
- true, if the given amount of time is already expired.
Parameters
Name | Type | Description |
---|---|---|
so8601Start | | `object`` | | he start time for the time range in ISO-8601 format. |
so8601End | | `object`` | | he endtime for the time range in ISO-8601 format. |
xpiredInPercents | | `float`` | | he percentage as float (e.g. 0,9 = 90%), the range is already expired. |
urrentDate | | `object`` | | he current date, the calculation must use. |
Example
Code Block |
---|
@date.isExpired(iso8601Start,iso8601End,expiredInPercents,currentDate) |
...
boolean
- true in case the give current date is overdue.
Parameters
Name | Type | Description |
---|---|---|
ueDate | | `object`` | | he due after overdue is true. |
urrentDate | | `object`` | | he current date. |
Example
Code Block |
---|
@date.isOverdue(dueDate,currentDate) |
...
boolean
- true in case the give current date is overdue.
Parameters
Name | Type | Description |
---|---|---|
ueDate | | `object`` | | he due after overdue is true. |
Example
Code Block |
---|
@date.isOverdue(dueDate) |
...
instant
- The instant parsed from the given date time object.
Parameters
Name | Type | Description |
---|---|---|
ateTime | | `object`` | | he date time object to be parsed. |
Example
Code Block |
---|
@date.parseToInstant(dateTime) |
...
long
- The beginning of the year relative to current year as epoch millis,
with hours, minutes, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
earOffset | | `int`` | | he years to be added (positive value) or subtracted (negative value) from current year. |
Example
Code Block |
---|
@date.beginOfYear(yearOffset) |
...
long
- The beginning of the year relative to given timestamp as epoch millis,
with hours, minutes, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
imestamp | | `long`` | | he epoch millis to calculate the beginning of the year from. If null, the current timestamp will be used. |
earOffset | | `int`` | | he years to be added (positive value) or subtracted (negative value) from given year. |
Example
Code Block |
---|
@date.beginOfYear(timestamp,yearOffset) |
...
long
- The beginning of the month relative to current month as epoch millis,
with hours, minutes, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
onthOffset | | `int`` | | he months to be added (positive value) or subtracted (negative value) from current month. |
Example
Code Block |
---|
@date.beginOfMonth(monthOffset) |
...
long
- The beginning of the month relative to given timestamp as epoch millis,
with hours, minutes, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
imestamp | | `long`` | | he epoch millis to calculate the beginning of the month from. If null, the current timestamp will be used. |
onthOffset | | `int`` | | he months to be added (positive value) or subtracted (negative value) from given month. |
Example
Code Block |
---|
@date.beginOfMonth(timestamp,monthOffset) |
...
long
- The beginning of the week relative to current week as epoch millis,
with hours, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
eekStartDay | | `integer`` | | he start day of the week as int from Monday(1) to Sunday(7). If null or negative, Monday(1) is used. |
eekOffset | | `int`` | | he weeks to be added (positive value) or subtracted (negative value) from current week. |
Example
Code Block |
---|
@date.beginOfWeek(weekStartDay,weekOffset) |
...
long
- The beginning of the week relative to given timestamp as epoch millis, with hours, seconds
and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
imestamp | | `long`` | | he epoch millis to calculate the beginning of the week from. If null, the current timestamp will be used. |
eekStartDay | | `integer`` | | he start day of the week as int from Monday(1) to Sunday(7). If null or negative, Monday(1) is used. |
eekOffset | | `int`` | | he weeks to be added (positive value) or subtracted (negative value) from given week. If you would like to know the start date of the week before for example, you would set this to -1. And for two weeks before you would set it to -2, aso. And to detect the beginning of the week of the given timestamp, you would set it to 0. |
Example
Code Block |
---|
@date.beginOfWeek(timestamp,weekStartDay,weekOffset) |
...
long
- The beginning of the day relative to given current day as epoch millis,
with hours, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
ayOffset | | `int`` | | he days to be added (positive value) or subtracted (negative value) from current day. |
Example
Code Block |
---|
@date.beginOfDay(dayOffset) |
...
long
- The beginning of the day relative to given timestamp as epoch millis,
with hours, seconds and millis reset to 0.
Parameters
Name | Type | Description |
---|---|---|
imestamp | | `long`` | | he epoch millis to calculate the beginning of the day from. If null, the current timestamp will be used. |
ayOffset | | `int`` | | he days to be added (positive value) or subtracted (negative value) from given day. |
Example
Code Block |
---|
@date.beginOfDay(timestamp,dayOffset) |
...
jsonnode
- The result of the function in PIPEFORCE result format.
Parameters
Name | Type | Description |
---|---|---|
ame | | `string`` | | he name of the function to run. |
rgs | | `object`` | | he optional args to be passed to the function or null. |
Example
Code Block |
---|
@function.run(name,args) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
nput | | `object`` | | he input data to create a hash from. Can be a string, a byte array or a collection of strings. |
Example
Code Block |
---|
@hash.sha256(input) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `string`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.sha256Concat(separator,text) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `collection`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.sha256Concat(separator,text) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
nput | | `object`` | | he input data to create a hash from. Can be a string, a byte array or a collection of strings. |
Example
Code Block |
---|
@hash.md5(input) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `string`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.md5Concat(separator,text) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `collection`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.md5Concat(separator,text) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
nput | | `object`` | | he input data to create a hash from. Can be a string, a byte array or a collection of strings. |
Example
Code Block |
---|
@hash.sha512(input) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `string`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.sha512Concat(separator,text) |
...
string
- The hash as hex string
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator to be used to concat the string. If null, empty string will be used. |
ext | | `collection`` | | he text (list) to concat into a string. |
Example
Code Block |
---|
@hash.sha512Concat(separator,text) |
...
user
- The user with given uuid or null.
Parameters
Name | Type | Description |
---|---|---|
serUuid | | `string`` | | he uuid of the user. |
Example
Code Block |
---|
@iam.userByUuid(userUuid) |
...
user
- The user with given username or null.
Parameters
Name | Type | Description |
---|---|---|
sername | | `string`` | | he username of the user. |
Example
Code Block |
---|
@iam.userByUsername(username) |
...
user
- The user with given email or null.
Parameters
Name | Type | Description |
---|---|---|
mail | | `string`` | | he email of the user. |
Example
Code Block |
---|
@iam.userByEmail(email) |
...
string
- The value of the environment variable or null in case it doesn't exist or is not allowed to be accessed.
Parameters
Name | Type | Description |
---|---|---|
ame | | `string`` | | he name of the environment variable. |
Example
Code Block |
---|
@instance.env(name) |
...
string
- The full url of the service.
Parameters
Name | Type | Description |
---|---|---|
erviceName | | `string`` | | he PIPEFORCE service name. |
Example
Code Block |
---|
@instance.url(serviceName) |
...
boolean
- true, in case at least one profile name from given list matches with a profile of the instance.
Parameters
Name | Type | Description |
---|---|---|
rofiles | | `object`` | | n array or comma separated list of profiles to check. |
Example
Code Block |
---|
@instance.hasProfile(profiles) |
...
string
- The given image name prefixed with the default repo.
Or the default repo prefix alone in case no image arg was given.
Parameters
Name | Type | Description |
---|---|---|
mage | | `string`` | | he image name to be prefixed by the repo. |
Example
Code Block |
---|
@instance.defaultImageRepo(image) |
...
jsonnode
- The content data behind the source, converted to a JSONful data object.
Parameters
Name | Type | Description |
---|---|---|
ource | | `object`` | | he JSON source to load. |
Example
Code Block |
---|
@json.load(source) |
...
object
- The result from the JsonPath query.
Parameters
Name | Type | Description |
---|---|---|
son | | `object`` | | he JSON object to apply the query to. |
uery | | `string`` | | he query to be applied. |
Example
Code Block |
---|
@json.path(json,query) |
...
string
- The JSON string.
Parameters
Name | Type | Description |
---|---|---|
son | | `object`` | | he JSON object to be converted to a string. |
Example
Code Block |
---|
@json.stringify(json) |
...
object
- The first element from list or null in case list is null or empty.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | ny supported list object. |
Example
Code Block |
---|
@list.first(value) |
...
object
- The last element from list or null in case list is null or empty.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | ny supported list object. |
Example
Code Block |
---|
@list.last(value) |
...
int
- The size of the list. 0 in case list is null or unknown type.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list. |
Example
Code Block |
---|
@list.size(list) |
...
boolean
- true in case the given list is null or empty.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list to check. |
Example
Code Block |
---|
@list.empty(list) |
...
object
- The sublist.
Parameters
Name | Type | Description |
---|---|---|
alue | | `object`` | | ny list object. |
xpression | | `string`` | | he list expression. |
Example
Code Block |
---|
@list.sublist(value,expression) |
...
collection
- The input list with new element or a new list in case the input list was unmodifiable.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list to append to. |
lement | | `object`` | | he element to append. |
Example
Code Block |
---|
@list.add(list,element) |
...
collection
- The input list with new element or a new list in case the input list was unmodifiable.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list to append to. |
lement | | `object`` | | he element to append. |
gnoreNulls | | `boolean`` | | f true, null items will not be added. |
Example
Code Block |
---|
@list.add(list,element,ignoreNulls) |
...
boolean
- True if list contains at least one of needle items.
Parameters
Name | Type | Description |
---|---|---|
ist | | `object`` | | he list to search in. |
eedles | | `object`` | | he items to search for. Can also be a list of items. |
Example
Code Block |
---|
@list.contains(list,needles) |
...
list
- A new, modifiable list with items copied over from given list.
Parameters
Name | Type | Description |
---|---|---|
ist | | `collection`` | | he list to create a flat copy from. |
Example
Code Block |
---|
@list.copy(list) |
...
string
- The joined path items as a path string.
Parameters
Name | Type | Description |
---|---|---|
athItems | | `object`` | | he path items to join as list. |
Example
Code Block |
---|
@path.join(pathItems) |
...
string
- The extension of the path without period (for example: txt)
Parameters
Name | Type | Description |
---|---|---|
ath | | `string`` | | he path string. |
Example
Code Block |
---|
@path.extension(path) |
...
string
- The base name of the path.
Parameters
Name | Type | Description |
---|---|---|
ath | | `string`` | | he path string. |
Example
Code Block |
---|
@path.basename(path) |
...
object
- The value of the property with given key or null in case property doesnt exist or has null value.
Parameters
Name | Type | Description |
---|---|---|
ey | | `string`` | | he property key |
Example
Code Block |
---|
@property.value(key) |
...
list<object>
- A list of values of all properties matching the given key pattern.
Parameters
Name | Type | Description |
---|---|---|
attern | | `string`` | | he property key pattern to match. |
Example
Code Block |
---|
@property.values(pattern) |
...
Updates the value of a property under given key.
Returns
void
Parameters
Name | Type | Description |
---|---|---|
ey | | `string`` | | he key of the property to update. |
alue | | `object`` | | he value of the property to update. |
Example
Code Block |
---|
@property.updateValue(key,value) |
...
property
- The property with given key or null in case no such property has been found.
Parameters
Name | Type | Description |
---|---|---|
ey | | `string`` | | he property key. |
Example
Code Block |
---|
@property.get(key) |
...
object
- The lazy map.
Parameters
Name | Type | Description |
---|---|---|
ey | | `string`` | | he property key with optional fragment reference in form 'global/pathsegment1/pathsegment...#fragment' |
Example
Code Block |
---|
@property.lazy(key) |
...
object
- The object representation of the uri.
Parameters
Name | Type | Description |
---|---|---|
ri | | `string`` | | he uri to be resolved. |
Example
Code Block |
---|
@resolve.uri(uri) |
...
@script
...
Provides utility functions inside a pipeline expression for simple calculations of listsexecute inline scripts.
You can access the functions declared here in the PEL using <code>@calc<<code>@script</code>
...
groovy(
...
script,args)
Converts Evaluates the given text value to upper casegroovy script.
Returns
string
object
- The upper case textevaluation result.
Parameters
Name | Type | Description |
---|
cript | | `string`` | | he script to execute |
rgs | | `object`` | | he |
variables to be passed to the script as args (read-only!) |
Example
Code Block |
---|
@text@script.upperCasegroovy(textscript,args) |
...
groovy(
...
script)
Returns the index of last occurrence of needle in Evaluates the given textgroovy script.
Returns
int
- The index of needle inside text or -1 in case it was not found or input was nullobject
- The evaluation result.
Parameters
Name | Type | Description |
---|
cript | |
`string`` | | he |
eedle |
`object`` |
script to execute |
Example
Code Block |
---|
@script.groovy(script) |
@text
...
Provides utility functions inside a pipeline expression for simple calculations of lists.
You can access the functions declared here in the PEL using <code>@calc</code>
upperCase(text)
Converts the given text value to upper case.
Returns
string
- The upper case text.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to convert. |
Example
Code Block |
---|
@text.lastIndexOfupperCase(text,needle) |
lastIndexOf(text,needle
...
)
Returns the index of last occurrence of needle in the given text.
Returns
int
- The index of needle inside text or -1 in case it was not found or input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to search for occurrence. |
eedle | | `object`` | | he text to search for. |
ffset |
`int`` |
he index to start search from.
Example
Code Block |
---|
@text.lastIndexOf(text,needle,offset) |
...
lastIndexOf(text,needle,offset)
Returns the index of the first last occurrence of needle in the given text.
Returns
int
- The index of first occurrence of needle inside text or -1 in case it was not found or input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to search for occurrence. |
eedle | | `object`` | | he text to search for. |
ffset | | `int`` | | he index to start search from. |
Example
Code Block |
---|
@text.indexOflastIndexOf(text,needle,offset) |
indexOf(text,needle
...
)
Returns the index of the first occurrence of needle in the given text.
Returns
int
- The index of first occurrence of needle inside text or -1 in case it was not found or input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to search for occurrence. |
eedle | | `object`` | | he text to search for. |
ffset |
Example
Code Block |
---|
@text.indexOf(text,needle) |
indexOf(text,needle,offset)
Returns the index of the first occurrence of needle in the given text.
Returns
int
- The index of first occurrence of needle inside text or -1 in case it was not found or input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to search for occurrence. |
eedle | | `object`` | | he text to search for. |
ffset | | `int`` | | he index to start search from. |
Example
Code Block |
---|
@text.indexOf(text,needle,offset) |
...
Returns the part from the beginning of the given text up to the stop word.
For example "Foo Bar" with stop word of " " would return "Foo" as prefix.
Returns
string
- The part of text up to the first occurrence of the stop word.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text. |
top | | `object`` | | he stop word. |
Example
Code Block |
---|
@text.prefix(text,stop) |
...
Returns the part from the stop word of the given text up to the end of the word.
For example "Foo Bar" with stop word of " " would return "Bar" as suffix.
Returns
string
- The part of text from stop word up to end of the text.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text. |
top | | `object`` | | he stop word. |
Example
Code Block |
---|
@text.suffix(text,stop) |
...
Converts the given text value to lower case.
Returns
string
- The lower case text.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text. |
Example
Code Block |
---|
@text.lowerCase(text) |
...
Returns true if given text is empty or null.
Returns
boolean
- true, in case the given text is an empty string or null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text. |
Example
Code Block |
---|
@text.isEmpty(text) |
...
Shorts the given string and adds ... at the end.
Returns
string
- The shortened text.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to shorten. |
ength | | `int`` | | he length. |
Example
Code Block |
---|
@text.shorten(text,length) |
...
Returns the len of the given text. In case the text is null, 0 is returned.
Returns
int
- The length of the text.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text. |
Example
Code Block |
---|
@text.length(text) |
...
Checks whether given text contains at least one of given needle texts, ignoring case.
Also value and text can be null.
Returns
boolean
- true in case text contains needle.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to search in. |
eedles | | `string`` | | comma separated list of needles to search inside text. |
Example
Code Block |
---|
@text.contains(text,needles) |
...
Tries to detect the language of given text.
Returns
string
- The detected language, one of: GERMAN, ENGLISH, FRENCH, UNKNOWN.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to detect the language for. |
Example
Code Block |
---|
@text.lang(text) |
...
Creates a random alphanumeric string of given size. Characters will be used from
a set of Latin alphabetic characters (a-z, A-Z) and the digits 0-9. No special chars.
Returns
string
- The random string.
Parameters
Name | Type | Description |
---|---|---|
ize | | `int`` | | he length of the random string. |
Example
Code Block |
---|
@text.random(size) |
...
Creates a new uuid with 32 digits and returns it as hexadecimal string.
For example: 66a637cc-19fc-4145-98c5-1a1b0bf010be
See RFC for specification: https://datatracker.ietf.org/doc/html/rfc4122
Returns
string
- The new random uuid.
Example
Code Block |
---|
@text.uuid() |
toHtml(text)
Converts the given text to an HTML fragment. Replaces &, gt and lt signs, keeps line breaks
and converts links to href elements.
Returns
string
- The HTML result.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to convert to HTML. |
Example
Code Block |
---|
@text.toHtml(text) |
...
Appends the given text to the given base text.
If one of the parts is null or empty, returns the other part only, without "null" concatenation.
Returns
string
- basetext + text
Parameters
Name | Type | Description |
---|---|---|
asetext | | `object`` | | he base text to append to. |
ext | | `object`` | | he text to append. |
Example
Code Block |
---|
@text.append(basetext,text) |
...
Concatenates the given list of objects using the given separator.
Ignores null items.
Returns
string
- The concatenated items as a string.
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator. |
ollection | | `object`` | | he collection of items to concat. |
Example
Code Block |
---|
@text.concat(separator,collection) |
...
Treats the given items as a list of texts and concats these items using the given separator.
Ignores null items.
Returns
string
- The concatenated items as a string.
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator between the items. |
tems | | `object`` | | he collection of items. |
Example
Code Block |
---|
@text.concat(separator,items) |
...
Same as #concat(separator, items) but with comma as default separator.
Returns
string
- The comma separated string of concatenated items.
Parameters
Name | Type | Description |
---|---|---|
ollection | | `object`` | | he collection of |
items to concatenate. |
Example
Code Block |
---|
@text.commajoin(collection) |
format(pattern,args)
Formats the given text using the given pattern and input args.
Returns
string
- The formatted string.
Parameters
Name | Type | Description |
---|---|---|
attern | | `string`` | | he format pattern to apply. Must be of the Formatter Syntax of Java. See: https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html |
rgs | | `object`` | | he args to be passed to the format pattern. |
Example
Code Block |
---|
@text.format(pattern,args) |
leftPad(text,size)
Left pad a text with spaces (' ').
The text is padded to the size of size.
StringUtils.leftPad(null, *) = null
StringUtils.leftPad("", 3) = " "
StringUtils.leftPad("bat", 3) = "bat"
StringUtils.leftPad("bat", 5) = " bat"
StringUtils.leftPad("bat", 1) = "bat"
StringUtils.leftPad("bat", -1) = "bat"
Returns
string
- The padded string.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text to add the padding. |
ize | | `int`` | | he size to pad the text to. |
Example
Code Block |
---|
@text.leftPad(text,size) |
leftPad(text,size,padChar)
Left pad a text with a specified character.
Pad to a size of size.
StringUtils.leftPad(null, *, *) = null
StringUtils.leftPad("", 3, 'z') = "zzz"
StringUtils.leftPad("bat", 3, 'z') = "bat"
StringUtils.leftPad("bat", 5, 'z') = "zzbat"
StringUtils.leftPad("bat", 1, 'z') = "bat"
StringUtils.leftPad("bat", -1, 'z') = "bat"
Returns
string
- The padded string.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text to add the padding. |
ize | | `int`` | | he size to pad the text to. |
adChar | | `char`` | | he char to be used for padding. |
Example
Code Block |
---|
@text.leftPad(text,size,padChar) |
rightPad(text,size)
Right pad a text with spaces (' ').
The test is padded to the size of size.
StringUtils.rightPad(null, *) = null
StringUtils.rightPad("", 3) = " "
StringUtils.rightPad("bat", 3) = "bat"
StringUtils.rightPad("bat", 5) = "bat "
StringUtils.rightPad("bat", 1) = "bat"
StringUtils.rightPad("bat", -1) = "bat"
Returns
string
- The padded string.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text to add the padding. |
ize | | `int`` | | he size to pad the text to. |
Example
Code Block |
---|
@text.rightPad(text,size) |
rightPad(text,size,padChar)
Right pad a text with a specified character.
The text is padded to the size of size.
StringUtils.rightPad(null, *, *) = null
StringUtils.rightPad("", 3, 'z') = "zzz"
StringUtils.rightPad("bat", 3, 'z') = "bat"
StringUtils.rightPad("bat", 5, 'z') = "batzz"
StringUtils.rightPad("bat", 1, 'z') = "bat"
StringUtils.rightPad("bat", -1, 'z') = "bat"
Returns
string
- The padded string.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text to add the padding. |
ize | | `int`` | | he size to pad the text to. |
adChar | | `char`` | | he char to be used for padding. |
Example
Code Block |
---|
@text.commajoin(collectionrightPad(text,size,padChar) |
concatAndFormat(separator,collection,pel)
Similar to #concat(text1, Object...) but additionally applies the given PEL expression on
each list entry before it gets concatenated. This is useful for example to convert each entry in
the list before adding it to the resulting string. For example to remove whitespaces on each entry.
Returns
string
- The concatenated string.
Parameters
Name | Type | Description |
---|---|---|
eparator | | `string`` | | he separator. |
ollection | | `object`` | | he collection of items to concatenate. |
el | | `string`` | | he pipeline expression without wrapping #{ and } |
Example
Code Block |
---|
@text.concatAndFormat(separator,collection,pel) |
...
Tests the given text whether it starts with given prefix.
Returns
boolean
- true if given text starts with the second parameter provided
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text |
refix | | `string`` | | he prefix to test |
Example
Code Block |
---|
@text.startsWith(text,prefix) |
...
Replace all occurrences of a needle text with replacement text.
Returns
string
- The text with replacements applied.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to apply replacements. |
eedle | | `string`` | | he needle text matching all replacement sources. |
eplacement | | `string`` | | he string to be substituted for each match. |
Example
Code Block |
---|
@text.replaceAll(text,needle,replacement) |
...
Returns a substring from the given text,
starting at beginIndex up to the end of the text.
Returns
string
- The substring from given text, null in case text is null or empty string in
case text contains no such substring range.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to return substring from. |
eginIndex | | `int`` | | he 0-based index to start the substring (inclusive). |
Example
Code Block |
---|
@text.substring(text,beginIndex) |
...
Returns a substring from the given text,
starting at beginIndex up to endIndex.
Returns
string
- The substring from given text or empty string in case text contains no such substring range.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to return substring from. |
eginIndex | | `int`` | | he 0-based index to start the substring (inclusive). |
ndIndex | | `int`` | | he 0-based index to end the substring (exclusive). |
Example
Code Block |
---|
@text.substring(text,beginIndex,endIndex) |
...
Removes any leading and ending whitespaces.
Returns
string
- The text with leading and ending whitespaces removed.
If input text was null, null is returned here.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to remove any whitespaces from. |
Example
Code Block |
---|
@text.trim(text) |
...
Returns true, if all of the given string values is empty: Is null, contains no characters or whitespaces only.
If at least one of it is not empty, returns false.
Returns
boolean
- True, if all are empty.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he list of text items to check. |
Example
Code Block |
---|
@text.isAllEmpty(text) |
...
Converts the given text string into a string which contains only the
chars 0-9,a-z,A-Z and _. The conversion rule is:
Umlauts will become their non-umlaut representation. For example รค
becomes ae.
Any other special characters become underscore. For example ? becomes
_.
Returns
string
- The converted text or null in case input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to convert. |
Example
Code Block |
---|
@text.toAlphaNumeric(text) |
...
Makes the first char of the given text to upper case.
Returns
string
- The text with first char to upper case or null in case input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to change. |
Example
Code Block |
---|
@text.firstCharUpper(text) |
...
Makes the first char of the given text to lower case.
Returns
string
- The text with first char to lower case or null in case input was null.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to change. |
Example
Code Block |
---|
@text.firstCharLower(text) |
...
Splits the given text into a list of items by given split token.
Returns
list<string>
- A list of split items or empty list in case input text or input token is null or empty.
Parameters
Name | Type | Description |
---|---|---|
ext | | `object`` | | he text to split to tokens. |
oken | | `object`` | | he token to split the text with. |
Example
Code Block |
---|
@text.split(text,token) |
replaceCharAt(text,pos,c)
Replaces the character at given position in the text and returns the new text.
Returns
string
- The new text with replaced char.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | he text to replace the char on. |
os | | `int`` | | he position in the text to replace the char. If negative or >= text length, the original text is returned without any replacement. |
| | `char`` | | he new character. |
Example
Code Block |
---|
@text.replaceCharAt(text,pos,c) |
matches(text,regexp)
Searches text for first regexp match.
Returns
list<string>
- On success, list with at least one item is returned. At index 0 the whole matched string is placed, and
then from index 1, all regexp capturing groups are listed.
An empty list is returned when no match.
Parameters
Name | Type | Description |
---|---|---|
ext | | `string`` | | o search for matches |
egexp | | `string`` | | egular expression to use |
Example
Code Block |
---|
@text.matches(text,regexp) |
...
Returns a String value for a CSV column enclosed in double quotes, if required.
If the value contains a comma, newline or double quote, then the String value is returned enclosed in double quotes.
Any double quote characters in the value are escaped with another double quote.
If the value does not contain a comma, newline or double quote, then the String value is returned unchanged.
Returns
string
- value embeddable into csv column
Parameters
Name | Type | Description |
---|---|---|
alue | | `string`` | | nput text to escape |
Example
Code Block |
---|
@text.escapeCsvValue(value) |
...
Note: This function is deprecated. Use @resolve.uri
instead.
Returns
object
- The object representation of the uri.
Parameters
Name | Type | Description |
---|---|---|
ri | | `string`` | | he uri to be resolved. |
Example
Code Block |
---|
@uri.resolve(uri) |
...
Returns the username of the currently logged-in user.
Returns
string
- The username of the user.
Example
Code Block |
---|
@user.username() |
...
Returns the uuid of the logged-in user.
Returns
string
- The uuid of the user.
Example
Code Block |
---|
@user.uuid() |
hasPermission(permissionKeys)
Returns true in case the logged-in user has at least one of the listed permission.
Returns
boolean
- true in case the currently logged-in user has the permisson.
Parameters
Name | Type | Description |
---|---|---|
ermissionKeys | | `string`` | | list of permission keys (roles) to check for. |
Example
Code Block |
---|
@user.hasPermission(permissionKeys) |
...
Returns the default display name of the logged-in user which is the first non-empty value of:
firstName lastName, email, uuid. Note: Doesn't return the username for security reasons.
Returns
string
- The display name.
Example
Code Block |
---|
@user.displayName() |
...
Returns the email and default display name of the given user object or empty string if
no such value exists.
Returns
string
- The email and display name in the format email@domain.tld (FirstName LastName).
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he user object to extract email and displayName from. |
Example
Code Block |
---|
@user.emailAndDisplayName(object) |
...
Returns the email and default display name of the currently logged-in user object or empty string if
no such value exists.
Returns
string
- The email and display name in the format email@domain.tld (FirstName LastName).
Example
Code Block |
---|
@user.emailAndDisplayName() |
...
Tries to dynamically create a meaningful display name out of the given user object.
This user object can be of different format. The method tries to
automatically detect it and creates the displayName from it. If this
was not possible for some reason, an empty string is returned.
Returns
string
- The display name.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | he user object. |
Example
Code Block |
---|
@user.displayName(object) |
...
Returns the primary email address of the currently logged-in user.
Returns
string
- The email address as string.
Example
Code Block |
---|
@user.email() |
email(object)
Tries to detect the email from the given object.
Returns
string
- The email address as string.
Parameters
Name | Type | Description |
---|---|---|
bject | | `object`` | | n object like a user or a JSON containing an email property. |
Example
Code Block |
---|
@user.email(object) |
...
Returns the locale of the logged in user or null in case not set or could not be determined.
Returns
string
- The lower case locale (for example: de, en, fr, ...)
Example
Code Block |
---|
@user.locale() |
firstName()
Returns the first name of the logged in user.
Returns
string
- The first name.
Example
Code Block |
---|
@user.firstName() |
...
Returns the last name of the logged in user
Returns
string
- The last name.
Example
Code Block |
---|
@user.lastName() |
...
Returns true in case the current user is authenticated (logged-in).
Returns
boolean
- true, in case authenticated.
Example
Code Block |
---|
@user.loggedIn() |
...
Returns the preferred zoneId of the currently logged-in user or null in case none was set.
The preferred zone is usually set in the users profile or by the client in use (e.g. the browser).
See {@link ZoneId#getAvailableZoneIds()} and here: http://www.iana.org/time-zones
Returns
string
- The zone as string.
Example
Code Block |
---|
@user.zone() |
@xml
...
Evaluates given XPath expression of given document and returns the result as a list of DOM nodes.
Returns
list
- The result of the applied expression as a list of DOM nodes.
Parameters
Name | Type | Description |
---|---|---|
ocument | | `object`` | | he document to be applied. Can be a DOM or an XML string. |
path | | `string`` | | he expression to be applied. |
Example
Code Block |
---|
@xml.xpath(document,xpath) |
...
Evaluates given XPath expression of given document and returns the result as a text value.
Returns
string
- The result of the applied expression as text.
Parameters
Name | Type | Description |
---|---|---|
ocument | | `object`` | | he document to be applied. Can be a DOM or an XML string. |
path | | `string`` | | he expression to be applied. |
Example
Code Block |
---|
@xml.xpathAsText(document,xpath) |
...