Package org.appng.api.rest
Class ActionHelper
- java.lang.Object
-
- org.appng.api.rest.ActionHelper
-
-
Constructor Summary
Constructors Constructor Description ActionHelper(org.springframework.http.ResponseEntity<Action> action)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ActionHelper
create(org.springframework.http.ResponseEntity<Action> action)
ActionHelper
deselectAllOptions(String name)
De-selects allOption
s of a selectionOptional<ActionField>
getField(String name)
Optional<ActionField>
getField(List<ActionField> fields, String name)
ActionHelper
setFieldSelectionValue(String name, String value)
Marks anOption
as selected.ActionHelper
setFieldValue(String name, Object value)
-
-
-
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 anOption
as selected. If the field'sOptions
allow multiple selected values, activeOption
s will remain active. Otherwise, previously activeOptions
will be de-selected.- Parameters:
name
- the name of the fieldvalue
- the option value to select- Returns:
- the current
ActionHelper
-
deselectAllOptions
public ActionHelper deselectAllOptions(String name)
De-selects allOption
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)
-
-