org.appng.testsupport

## Class TestBase.ActionCall

- java.lang.Object
- - org.appng.xml.BaseObject
  - - org.appng.xml.platform.ActionRef
    - - org.appng.testsupport.TestBase.ActionCall

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    TestBase

      protected class TestBase.ActionCall
      extends ActionRef

  A wrapper for an `ActionRef`, allowing to add `Param`eters and to retrieve the actual `CallableAction`.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.appng.xml.platform.ActionRef

      `async, clientValidation, condition, eventId, forceForward, id, mode, onSuccess, params, permissions`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TestBase.ActionCall` | `clearParams()`
    `CallableAction` | `getCallableAction(Object form)` Returns the `CallableAction`.
    `<T> T` | `getForm()` Returns the initial form for the action, i.e.
    `Params` | `getParams()` Gets the value of the params property.
    `Action` | `initialize()` Returns the `Action` in it's initial state, meaning the action is initialized with the original data coming from `DataProvider`, but not performed.
    `TestBase.ActionCall` | `withParam(String name, String value)` Adds a `Param` to the wrapped `ActionRef`.

    - ### Methods inherited from class org.appng.xml.platform.ActionRef

      `getAsync, getClientValidation, getCondition, getEventId, getId, getMode, getOnSuccess, getPermissions, isForceForward, setAsync, setClientValidation, setCondition, setEventId, setForceForward, setId, setMode, setOnSuccess, setParams, setPermissions`

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

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

- - ### Method Detail

    - #### getParams

          public Params getParams()

      Description copied from class: `ActionRef`
      Gets the value of the params property.
      Overrides:
        `getParams` in class `ActionRef`
      Returns:
        possible object is `Params`

    - #### clearParams

          public TestBase.ActionCall clearParams()

    - #### withParam

          public TestBase.ActionCall withParam(String name,
                                               String value)

      Adds a `Param` to the wrapped `ActionRef`.
      Parameters:
        `name` - the name of the `Param`
        `value` - the value
      Returns:

    - #### getCallableAction

          public CallableAction getCallableAction(Object form)
                                           throws ProcessingException

      Returns the `CallableAction`.
      Parameters:
        `form` - an instance of the bind-object used by the `Action`. The type must be compatible with `MetaData.getBindClass()` of the `Datasource` that is used by the `Action`.
      Returns:
        the `CallableAction`
      Throws:
        `ProcessingException` - if an error occurs while assembling the CallableAction

    - #### initialize

          public Action initialize()
                            throws ProcessingException

      Returns the `Action` in it's initial state, meaning the action is initialized with the original data coming from `DataProvider`, but not performed.
      Returns:
        the `Action`
      Throws:
        `ProcessingException` - if an error occurs while assembling the Action

    - #### getForm

          public <T> T getForm()
                        throws ProcessingException

      Returns the initial form for the action, i.e. of the underlying `Datasource`, if any. This is done by directly calling `DataProvider.getData(Site, Application, Environment, org.appng.api.Options, Request, FieldProcessor)` and then returning the result of `DataContainer.getItem()`.
      Returns:
        the initial form, may be `null`
      Throws:
        `ProcessingException` - if an error occurs while retrieving the data

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