Record Class SurfaceDivBuilder.HeaderAction

java.lang.Object
java.lang.Record
su.onno.ui.divkit.SurfaceDivBuilder.HeaderAction
Enclosing class:
SurfaceDivBuilder

public static record SurfaceDivBuilder.HeaderAction(String icon, String label, String tone, String url, String placement, List<Map<String,Object>> form, Map<String,Object> formDialog, boolean disabled, boolean dynamicForm) extends Record
form (may be empty): an action-form dialog's field descriptors — the client collects them in a modal before POSTing the action (see ActionSpec.ActionBuilder#form). disabled renders the button greyed and inert — a custom DETAIL action whose enabledWhen predicate failed against the loaded record (issue #255). dynamicForm: the modal fetches its opening values from GET /api/actions/{kind}/{name}/{key}/form before rendering (formDefaults).
  • Constructor Details

    • HeaderAction

      public HeaderAction(String icon, String label, String tone, String url, String placement, List<Map<String,Object>> form, Map<String,Object> formDialog, boolean disabled, boolean dynamicForm)
      Creates an instance of a HeaderAction record class.
      Parameters:
      icon - the value for the icon record component
      label - the value for the label record component
      tone - the value for the tone record component
      url - the value for the url record component
      placement - the value for the placement record component
      form - the value for the form record component
      formDialog - the value for the formDialog record component
      disabled - the value for the disabled record component
      dynamicForm - the value for the dynamicForm record component
  • 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.
    • icon

      public String icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • tone

      public String tone()
      Returns the value of the tone record component.
      Returns:
      the value of the tone record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • placement

      public String placement()
      Returns the value of the placement record component.
      Returns:
      the value of the placement record component
    • form

      public List<Map<String,Object>> form()
      Returns the value of the form record component.
      Returns:
      the value of the form record component
    • formDialog

      public Map<String,Object> formDialog()
      Returns the value of the formDialog record component.
      Returns:
      the value of the formDialog record component
    • disabled

      public boolean disabled()
      Returns the value of the disabled record component.
      Returns:
      the value of the disabled record component
    • dynamicForm

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