Package su.onno.ui
Record Class ActionFeedback
java.lang.Object
java.lang.Record
su.onno.ui.ActionFeedback
- Record Components:
severity- action outcome tonepresentation- preferred client surfacetitle- optional headingmessage- primary explanationdetails- optional readable detail/bullet linesfieldErrors- action-form errors keyed by input nameformErrors- cross-field/action-form errorsdismissLabel- optional acknowledgement button labelkeepFormOpen- 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 Summary
ConstructorsConstructorDescriptionActionFeedback(ActionSeverity severity, ActionPresentation presentation, String title, String message, List<String> details, Map<String, List<String>> fieldErrors, List<String> formErrors, String dismissLabel, boolean keepFormOpen) Creates an instance of aActionFeedbackrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondetails()Returns the value of thedetailsrecord component.Returns the value of thedismissLabelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldErrorsrecord component.Returns the value of theformErrorsrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thekeepFormOpenrecord component.message()Returns the value of themessagerecord component.Returns the value of thepresentationrecord component.severity()Returns the value of theseverityrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActionFeedback
public ActionFeedback(ActionSeverity severity, ActionPresentation presentation, String title, String message, List<String> details, Map<String, List<String>> fieldErrors, List<String> formErrors, String dismissLabel, boolean keepFormOpen) Creates an instance of aActionFeedbackrecord class.- Parameters:
severity- the value for theseverityrecord componentpresentation- the value for thepresentationrecord componenttitle- the value for thetitlerecord componentmessage- the value for themessagerecord componentdetails- the value for thedetailsrecord componentfieldErrors- the value for thefieldErrorsrecord componentformErrors- the value for theformErrorsrecord componentdismissLabel- the value for thedismissLabelrecord componentkeepFormOpen- the value for thekeepFormOpenrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
presentation
Returns the value of thepresentationrecord component.- Returns:
- the value of the
presentationrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
details
Returns the value of thedetailsrecord component.- Returns:
- the value of the
detailsrecord component
-
fieldErrors
Returns the value of thefieldErrorsrecord component.- Returns:
- the value of the
fieldErrorsrecord component
-
formErrors
Returns the value of theformErrorsrecord component.- Returns:
- the value of the
formErrorsrecord component
-
dismissLabel
Returns the value of thedismissLabelrecord component.- Returns:
- the value of the
dismissLabelrecord component
-
keepFormOpen
public boolean keepFormOpen()Returns the value of thekeepFormOpenrecord component.- Returns:
- the value of the
keepFormOpenrecord component
-