Class ClientFormAccess

java.lang.Object
com.axelor.ai.tool.ClientFormAccess

public final class ClientFormAccess extends Object
Holds the tools that work on the form open in the browser to the rules the record tools are held to.

These tools run in the browser, which reads and writes the form as its user sees it — and the browser shows an administrator every field. So the server checks what passes through it: what set_active_form_data is asked to set, before the call goes to the browser, and what get_active_form_data answers, before the model reads it — as update_record and read_record are held, to the call's Access.

  • Field Details

  • Method Details

    • checkSet

      public static String checkSet(Object input, Access access)
      The refusal for a set_active_form_data call, or null when it may go to the browser: the model it expects must be one the user and the agent may change — update a saved record, create an unsaved one — the saved record one they may update, and every field it sets one they may write.
    • checkTrigger

      public static String checkTrigger(Object input, Access access)
      The refusal for a trigger_save or trigger_action call, or null when it may go to the browser: a save writes the record, and an action may, so the record it expects is held as a set's is. A call that names none the browser refuses itself.
    • screenGet

      public static Object screenGet(Object output, Access access)
      A get_active_form_data answer as the model may read it: an error in its place when the form's model cannot be told, or it or the saved record open in it is out of the user's or the agent's reach; otherwise its values screened (Projection.screen(com.axelor.ai.governance.access.ModelRef, java.util.Map<java.lang.String, java.lang.Object>)), and a withheld field's description left out with it.
    • screenTrigger

      public static Object screenTrigger(Object output)
      What a browser-run save or action may tell the model: whether it went through, the record it acted on, and the messages it raised. Never the values a save answers with, or an action's response may: the form's values reach the model through get_active_form_data alone, screened.