Package su.onno.ui

Record Class ActionFeedback

java.lang.Object
java.lang.Record
su.onno.ui.ActionFeedback
Record Components:
severity - action outcome tone
presentation - preferred client surface
title - optional heading
message - primary explanation
details - optional readable detail/bullet lines
fieldErrors - action-form errors keyed by input name
formErrors - cross-field/action-form errors
dismissLabel - optional acknowledgement button label
keepFormOpen - whether a submitting action form remains open (normally true for rejection)

public record ActionFeedback(ActionSeverity severity, ActionPresentation presentation, String title, String message, List<String> details, Map<String,List<String>> fieldErrors, List<String> formErrors, String dismissLabel, boolean keepFormOpen) extends Record
Structured, semantic feedback from a server-side action.
  • Constructor Details

  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • severity

      public ActionSeverity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component
    • presentation

      public ActionPresentation presentation()
      Returns the value of the presentation record component.
      Returns:
      the value of the presentation record component
    • title

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

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

      public List<String> details()
      Returns the value of the details record component.
      Returns:
      the value of the details record component
    • fieldErrors

      public Map<String,List<String>> fieldErrors()
      Returns the value of the fieldErrors record component.
      Returns:
      the value of the fieldErrors record component
    • formErrors

      public List<String> formErrors()
      Returns the value of the formErrors record component.
      Returns:
      the value of the formErrors record component
    • dismissLabel

      public String dismissLabel()
      Returns the value of the dismissLabel record component.
      Returns:
      the value of the dismissLabel record component
    • keepFormOpen

      public boolean keepFormOpen()
      Returns the value of the keepFormOpen record component.
      Returns:
      the value of the keepFormOpen record component