Package com.axelor.meta.headless
Record Class FormResult
java.lang.Object
java.lang.Record
com.axelor.meta.headless.FormResult
- Record Components:
status- how the run endedmessage- the error or refusal message, when there is onerecord- the root record and its lines as the session holds them: after a save, as read back; without one, as the actions left themsaved- whether the record was saved during the session, up to nowattrs- the display attributes actions set (readonly,hidden,required,title...), by node path (""for the root), then by widget; recorded, not enforcedmessages-info,notifyanderrormessages, in orderfieldErrors- field errors that stopped the run, by fieldviews- views the browser would have opened (viewitems), as the server sent themfiles- files and reports the browser would have offered for downloadhints- signals the browser would have acted on outside the form, e.g.refresh-appwrites- the records the form's actions wrote themselves, kept whatever the run did nextquestion- the open question whenFormResult.Status.SUSPENDED
public record FormResult(FormResult.Status status, String message, Map<String,Object> record, boolean saved, Map<String,Map<String,Map<String,Object>>> attrs, List<FormResult.Message> messages, Map<String,String> fieldErrors, List<Map<String,Object>> views, List<Map<String,Object>> files, List<String> hints, List<FormResult.Write> writes, ActionAlert question)
extends Record
What one
FormSession.run(java.util.List<com.axelor.meta.headless.FormStep>, com.axelor.meta.headless.ActionInteraction) or FormSession.resume(com.axelor.meta.headless.Decision, com.axelor.meta.headless.ActionInteraction) came to: the record as the session
holds it, whether it was saved, what the actions set and said, and why the run stopped.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA message the browser would have shown.static enumstatic final recordA record an action wrote in its own round trip, committed with it (ActionWrites). -
Constructor Summary
ConstructorsConstructorDescriptionFormResult(FormResult.Status status, String message, Map<String, Object> record, boolean saved, Map<String, Map<String, Map<String, Object>>> attrs, List<FormResult.Message> messages, Map<String, String> fieldErrors, List<Map<String, Object>> views, List<Map<String, Object>> files, List<String> hints, List<FormResult.Write> writes, ActionAlert question) Creates an instance of aFormResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionattrs()Returns the value of theattrsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldErrorsrecord component.files()Returns the value of thefilesrecord component.final inthashCode()Returns a hash code value for this object.hints()Returns the value of thehintsrecord component.message()Returns the value of themessagerecord component.messages()Returns the value of themessagesrecord component.question()Returns the value of thequestionrecord component.record()Returns the value of therecordrecord component.booleansaved()Returns the value of thesavedrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.views()Returns the value of theviewsrecord component.writes()Returns the value of thewritesrecord component.
-
Constructor Details
-
FormResult
public FormResult(FormResult.Status status, String message, Map<String, Object> record, boolean saved, Map<String, Map<String, Map<String, Object>>> attrs, List<FormResult.Message> messages, Map<String, String> fieldErrors, List<Map<String, Object>> views, List<Map<String, Object>> files, List<String> hints, List<FormResult.Write> writes, ActionAlert question) Creates an instance of aFormResultrecord class.- Parameters:
status- the value for thestatusrecord componentmessage- the value for themessagerecord componentrecord- the value for therecordrecord componentsaved- the value for thesavedrecord componentattrs- the value for theattrsrecord componentmessages- the value for themessagesrecord componentfieldErrors- the value for thefieldErrorsrecord componentviews- the value for theviewsrecord componentfiles- the value for thefilesrecord componenthints- the value for thehintsrecord componentwrites- the value for thewritesrecord componentquestion- the value for thequestionrecord 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 '=='. -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
record
Returns the value of therecordrecord component.- Returns:
- the value of the
recordrecord component
-
saved
public boolean saved()Returns the value of thesavedrecord component.- Returns:
- the value of the
savedrecord component
-
attrs
Returns the value of theattrsrecord component.- Returns:
- the value of the
attrsrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-
fieldErrors
Returns the value of thefieldErrorsrecord component.- Returns:
- the value of the
fieldErrorsrecord component
-
views
Returns the value of theviewsrecord component.- Returns:
- the value of the
viewsrecord component
-
files
Returns the value of thefilesrecord component.- Returns:
- the value of the
filesrecord component
-
hints
Returns the value of thehintsrecord component.- Returns:
- the value of the
hintsrecord component
-
writes
Returns the value of thewritesrecord component.- Returns:
- the value of the
writesrecord component
-
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-