org.appng.api

## Interface Options

- All Known Implementing Classes:
    OptionsImpl

      public interface Options

  `Options` are created from the `BeanOption`s of a `Bean` and contain several `Option`s. They are then passed to the bean, which is either an `ActionProvider`, a `DataProvider` or a `FormValidator`.
  Author:
    Matthias Herlitzius, Matthias Müller
  See Also:
    `ActionProvider`, `DataProvider`, `FormValidator`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Boolean` | `getBoolean(String name, String attribute)` Returns a `Boolean` parsed from the attribute with the given name for the `Option` with the given name.
    `<E extends Enum<E>> E` | `getEnum(String name, String attribute, Class<E> type)` Returns the `Enum` constant of the given type represented by the attribute with the given name for the `Option` with the given name.
    `Integer` | `getInteger(String name, String attribute)` Returns an `Integer` parsed from the attribute with the given name for the `Option` with the given name.
    `Option` | `getOption(String name)` Returns the `Option` with the given name, if present.
    `Set<String>` | `getOptionNames()` Returns the names of all available `Option`s
    `String` | `getOptionValue(String name, String attribute)` Returns the attribute with the given name for the `Option` with the given name.
    `String` | `getString(String name, String attribute)` Returns the attribute with the given name for the `Option` with the given name.
    `boolean` | `hasOption(String name)` Checks whether there is an `Option` with the given name.

- - ### Method Detail

    - #### getOptionNames

          Set<String> getOptionNames()

      Returns the names of all available `Option`s
      Returns:
        the names of all available `Option`s

    - #### hasOption

          boolean hasOption(String name)

      Checks whether there is an `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to check
      Returns:
        `true` there is an `Option` with the given name, `false` otherwise

    - #### getOption

          Option getOption(String name)

      Returns the `Option` with the given name, if present.
      Parameters:
        `name` - the name of the `Option` to get
      Returns:
        the `Option` with the given name, if present, `null` otherwise

    - #### getOptionValue

          String getOptionValue(String name,
                                String attribute)

      Returns the attribute with the given name for the `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to get the attribute from
        `attribute` - the name of the attribute of the `Option`
      Returns:
        the attribute with the given name, or `null` if either the `Option` or the attribute does not exist

    - #### getString

          String getString(String name,
                           String attribute)

      Returns the attribute with the given name for the `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to get the attribute from
        `attribute` - the name of the attribute of the `Option`
      Returns:
        the attribute with the given name, or `null` if either the `Option` or the attribute does not exist

    - #### getInteger

          Integer getInteger(String name,
                             String attribute)

      Returns an `Integer` parsed from the attribute with the given name for the `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to get the attribute from
        `attribute` - the name of the attribute of the `Option`
      Returns:
        the integer value, or `null` if either the `Option` or the attribute does not exist or the or the value can not be parsed to an integer

    - #### getBoolean

          Boolean getBoolean(String name,
                             String attribute)

      Returns a `Boolean` parsed from the attribute with the given name for the `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to get the attribute from
        `attribute` - the name of the attribute of the `Option`
      Returns:
        `Boolean.TRUE` if the value of the attribute equals to (ignoring case) `true`, `Boolean.FALSE` otherwise (also if no such `Option` exists)

    - #### getEnum

          <E extends Enum<E>> E getEnum(String name,
                                        String attribute,
                                        Class<E> type)

      Returns the `Enum` constant of the given type represented by the attribute with the given name for the `Option` with the given name.
      Parameters:
        `name` - the name of the `Option` to get the attribute from
        `attribute` - the name of the attribute of the `Option`
      Returns:
        the enum constant, if the (upper-case) attribute value represents a valid enum of the given type, `null` otherwise (also if no such `Option` exists)

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