org.appng.api.rest

## Class ActionHelper

- java.lang.Object
- - org.appng.api.rest.ActionHelper

-     public class ActionHelper
      extends Object

  Utility class that helps dealing with `Action`s.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActionHelper(org.springframework.http.ResponseEntity<Action> action)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ActionHelper` | `create(org.springframework.http.ResponseEntity<Action> action)`
    `ActionHelper` | `deselectAllOptions(String name)` De-selects all `Option`s of a selection
    `Optional<ActionField>` | `getField(List<ActionField> fields, String name)`
    `Optional<ActionField>` | `getField(String name)`
    `ActionHelper` | `setFieldSelectionValue(String name, String value)` Marks an `Option` as selected.
    `ActionHelper` | `setFieldValue(String name, Object value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ActionHelper

          public ActionHelper(org.springframework.http.ResponseEntity<Action> action)

  - ### Method Detail

    - #### create

          public static ActionHelper create(org.springframework.http.ResponseEntity<Action> action)

    - #### setFieldValue

          public ActionHelper setFieldValue(String name,
                                            Object value)

    - #### setFieldSelectionValue

          public ActionHelper setFieldSelectionValue(String name,
                                                     String value)

      Marks an `Option` as selected. If the field's `Options` allow multiple selected values, active `Option`s will remain active. Otherwise, previously active `Options` will be de-selected.
      Parameters:
        `name` - the name of the field
        `value` - the option value to select
      Returns:
        the current `ActionHelper`

    - #### deselectAllOptions

          public ActionHelper deselectAllOptions(String name)

      De-selects all `Option`s of a selection
      Parameters:
        `name` - the name of the selection field

    - #### getField

          public Optional<ActionField> getField(List<ActionField> fields,
                                                String name)

    - #### getField

          public Optional<ActionField> getField(String name)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.