Skip to content

Commit

Permalink
Improving variables section.
Browse files Browse the repository at this point in the history
  • Loading branch information
dejavix committed Feb 29, 2024
1 parent bb6b520 commit cf9f794
Showing 1 changed file with 42 additions and 10 deletions.
52 changes: 42 additions & 10 deletions docs/misc/notifications/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ Not available in expressionFilters.

|===

=== Expression variables for any events
== Expression Variables

[NOTE]
====
Expand All @@ -654,22 +654,15 @@ Please refer to the following documentation for the shorter notation rules:
====

=== Expression Variables for Any Events

|===
|Usage in Groovy |Usage in Velocity template | Description

|event.getChannel()
|$event.getChannel()
|Returns the channel for the event

|event.getFocusPassword()
|$event.getFocusPassword()
|Returns focal object password if known (e.g. during password generation)

|event.getPlaintextPassword()
|event.getPlaintextPassword()
|Returns resource object password if known (e.g. during password generation)


|event.getId()
|$event.getId()
|Returns randomly generated event ID
Expand Down Expand Up @@ -716,6 +709,45 @@ TIP: You can find more possible expression variables by inspecting https://docs.
Search *Full Javadoc* for specific version and then search for
`com.evolveum.midpoint.notifications.api.events` to start with.
Other variables are defined for specific event types which are defined as subinterfaces of `Event` package.

=== Expression Variables Specific For Model Event

|===
|Usage in Groovy |Usage in Velocity template | Description

|event.getChangeType()
|$event.getChangeType()
|Returns change type (ADD, MODIFY, DELETE) from the event

|event.getContentAsFormattedList()
|$event.getContentAsFormattedList()
|Returns formatted list of changes for this event. NOTE: The content is rendered in plain text and will not use any HTML formatting.

|event.getFocusPassword()
|$event.getFocusPassword()
|Returns focal object password if known (e.g. during password generation)

|===

=== Expression Variables Specific For ResourceObject Event

|===
|Usage in Groovy |Usage in Velocity template | Description

|event.getChangeType()
|$event.getChangeType()
|Returns change type (ADD, MODIFY, DELETE) from the event

|event.getContentAsFormattedList()
|$event.getContentAsFormattedList()
|Returns formatted list of changes for this event. NOTE: The content is rendered in plain text and will not use any HTML formatting.

|event.getPlaintextPassword()
|event.getPlaintextPassword()
|Returns resource object password if known (e.g. during password generation)

|===

////
TODO document other expression variables
Expand Down

0 comments on commit cf9f794

Please sign in to comment.