Record Class ActionAlert

java.lang.Object
java.lang.Record
com.axelor.meta.headless.ActionAlert
Record Components:
kind - what raised it
source - the action that raised the alert, or the button for a prompt; null when it cannot be told
message - the untranslated message from the action's definition, for matching; null when the alert was raised by code
displayed - the message as the user would read it: translated, templates filled
title - the dialog title, or null for the default
confirmTitle - the Yes button's title, or null for the default
cancelTitle - the No button's title, or null for the default

public record ActionAlert(ActionAlert.Kind kind, String source, String message, String displayed, String title, String confirmTitle, String cancelTitle) extends Record
A question the browser would put to the user: an alert from an action, a button's prompt, or a request to re-authenticate.
  • Constructor Details

    • ActionAlert

      public ActionAlert(ActionAlert.Kind kind, String source, String message, String displayed, String title, String confirmTitle, String cancelTitle)
      Creates an instance of a ActionAlert record class.
      Parameters:
      kind - the value for the kind record component
      source - the value for the source record component
      message - the value for the message record component
      displayed - the value for the displayed record component
      title - the value for the title record component
      confirmTitle - the value for the confirmTitle record component
      cancelTitle - the value for the cancelTitle record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • kind

      public ActionAlert.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • source

      public String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • displayed

      public String displayed()
      Returns the value of the displayed record component.
      Returns:
      the value of the displayed record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • confirmTitle

      public String confirmTitle()
      Returns the value of the confirmTitle record component.
      Returns:
      the value of the confirmTitle record component
    • cancelTitle

      public String cancelTitle()
      Returns the value of the cancelTitle record component.
      Returns:
      the value of the cancelTitle record component