← Back to plugin index

Regexp Data Transformer

Description
This plugin transforms selected values using a regular expression containing a capturing group and using a replacement pattern.
Type name
RegexpDataTransformer
Class
com.airlock.iam.core.misc.util.datatransformer.RegexpDataTransformer
May be used by
Properties
Properties (properties)
Description
Selects the properties to apply the replacement to.
Use the asterisk character ("*") to replace all properties.
Attributes
String-List
Mandatory
Pattern (pattern)
Description

Regular expression pattern containing a group (a region embraced by parentheses) that can be used in conjunction with property "Replacement" in order to transform data. If the string does not match, no transformation is performed.

Example: The pattern "(.*)" and the replacement "user.$1" will transform the string "jdoe" to "user.jdoe".

Example: The pattern "user\.(.*)" and the replacement "$1" will transform the string "user.jdoe" to "jdoe".

Attributes
RegEx
Mandatory
Replacement (replacement)
Description
The replacement string used in conjunction with property "Pattern" in order to transform a string. The token "$1" is used to reference the string matching the group in the pattern. Use notation "${foo}" to access context data attribute "foo".
Attributes
String
Mandatory
Example
user.$1
Example
$1
Example
user.$1-${lastname}
Missing Context Data Behaviour (missingContextDataBehaviour)
Description

The behaviour to adopt when a referenced value in "Replacement" is missing.

Example: The replacement is "email:${email}" but the email context data is not set.

"Unresolved Reference Value": leave the matching pattern as is. In the above example, the resulting string will be "email:${email}"

"Empty String": use an empty string. In the above example, the resulting string will be "email:"

"Error": missing context data, such as the above example, leads to an error.

Attributes
Enum
Optional
Default value
UNRESOLVED_REFERENCE_VALUE
YAML Template (with default values)

type: RegexpDataTransformer
id: RegexpDataTransformer-xxxxxx
displayName: 
comment: 
properties:
  missingContextDataBehaviour: UNRESOLVED_REFERENCE_VALUE
  pattern:
  properties:
  replacement: