Package com.axelor.meta.headless
Class ActionChain
java.lang.Object
com.axelor.meta.headless.ActionChain
An action chain as its actions' definitions write it out — read, never run: groups flattened with
their conditions, validations and conditions with their checks, records and attributes with their
fields, Java steps and navigation by name.
ActionChain chain = ActionChain.of(button.onClick());
chain.points(); // the questions and stops a run of it can meet
From it come the interactive points a chain can reach, which a caller answering a session's
questions is written against: every alert, error and message an action-validate can
raise, every pseudo-action, every Java step (which may alert; its code is not read). And from the
attributes its action-attrs set, FormSpec.limits() finds those a browser would
enforce.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAnaction-recordoraction-attrs: what it sets.static final recordA check of a validation or condition.static final recordAnaction-condition: checks that set field errors, which stop the chain.static final recordA field anaction-recordsets, or an attribute anaction-attrssets.static final recordAnaction-group, its items in order.static final recordA Java step:class:method, directly or through anaction-method.static final recordA name no action answers to: it does nothing, and a run skips it.static final recordAnaction-view: navigation, returned to the caller rather than followed.static final recordAnother kind of action: a script, a report, an export, a web service...static final recordA place in a chain where a run meets something only a person or the browser handles.static final recordsave,validate,closeornew, handled by the client.static final recordAn action already written out above it, not repeated: a cycle, or too deep.static interfaceOne element of a chain, written out.static final recordAnaction-validate: its alerts, errors and messages in order. -
Method Summary
Modifier and TypeMethodDescriptionactions()The names of every action the chain reaches, groups included.booleanisEmpty()static ActionChainA chain, comma separated, written out; a blank or null chain has no steps.points()Every interactive point the chain can reach, in order, each once.steps()Its elements, in order, groups holding theirs.text()The chain as written.toString()
-
Method Details
-
of
A chain, comma separated, written out; a blank or null chain has no steps. -
text
The chain as written. -
steps
Its elements, in order, groups holding theirs. -
isEmpty
public boolean isEmpty() -
toString
-
points
Every interactive point the chain can reach, in order, each once. -
actions
The names of every action the chain reaches, groups included.
-