Package com.orchestranetworks.ui.form.widget

# Interface WidgetValidationContext

All Known Subinterfaces:
  `WidgetListValidationContext`

public interface WidgetValidationContext
Encapsulates an HTTP request so that a custom widget can provide the user input validation context.

Since:
  5.8.0
See Also:
  - `UICustomWidget`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SchemaNode`
  `getNode(Path aPath)`
  Returns the node located at the specified path.
  `String`
  `getOptionalRequestParameterValue(String aParameterName)`
  Returns the HTTP parameter value in the incoming request.
  `String[]`
  `getOptionalRequestParameterValues(String aParameterName)`
  Returns the HTTP parameter values in the incoming request.
  `AccessPermission`
  `getPermission(Path aPath)`
  Returns the current user's access rights on the node specified by a path.
  `Session`
  `getSession()`
  Returns the current session.
  `Object`
  `getValue(Path aPath)`
  Returns the value to the specified path.
  `ValueContextForInputValidation`
  `getValueContext()`
  Returns the validation context of the current node.
  `ValueContextForInputValidation`
  `getValueContext(Path aPath)`
  Returns the validation context of the specified node.
  `String`
  `getWidgetName()`
  Returns a string that uniquely identifies the current component in the current page.
  `String`
  `getWidgetName(Path aPath)`
  Returns the custom widget name based on the given path.
  `String`
  `getWidgetName(String aLocalId)`
  Returns the custom widget name based on the given string.
  `String`
  `getWidgetNameOfParent()`
  Returns the custom widget name of the parent component.

- ## Method Details

  - ### getValue

    Object getValue(Path aPath)
    Returns the value to the specified path.
    Parameters:
      `aPath` - the location of the target relative to the current node (for maximizing reusability, it is advised to use a relative path)

  - ### getSession

    Session getSession()
    Returns the current session.

  - ### getValueContext

    ValueContextForInputValidation getValueContext()
    Returns the validation context of the current node.

  - ### getValueContext

    ValueContextForInputValidation getValueContext(Path aPath)
    Returns the validation context of the specified node.

  - ### getOptionalRequestParameterValue

    String getOptionalRequestParameterValue(String aParameterName)
    Returns the HTTP parameter value in the incoming request.

  - ### getOptionalRequestParameterValues

    String[] getOptionalRequestParameterValues(String aParameterName)
    Returns the HTTP parameter values in the incoming request.

  - ### getNode

    SchemaNode getNode(Path aPath)
    Returns the node located at the specified path.
    See Also:
      - `SchemaNode.getNode(Path)`

  - ### getWidgetName

    String getWidgetName()
    Returns a string that uniquely identifies the current component in the current page.

    The widget name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the widget name policy can be modified at any time.

  - ### getWidgetName

    String getWidgetName(Path aPath)
    Returns the custom widget name based on the given path. Can be used as a prefix or a suffix to generate identifiers of inner input components.

    The widget name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the widget name policy can be modified at any time.

    Parameters:
      `aPath` - location of the target relative to the current node (for maximizing reusability, it is advised to use a relative path)

  - ### getWidgetName

    String getWidgetName(String aLocalId)
    Returns the custom widget name based on the given string. Can be used as a prefix or a suffix to generate identifiers of inner input components.

    The widget name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the widget name policy can be modified at any time.

    Parameters:
      `aLocalId` - must respect the pattern `[a-zA-Z0-9_.-]+`

  - ### getWidgetNameOfParent

    String getWidgetNameOfParent()
    Returns the custom widget name of the parent component. Can be used as a prefix or a suffix to generate identifiers of inner input components.

    The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.

  - ### getPermission

    AccessPermission getPermission(Path aPath)
    Returns the current user's access rights on the node specified by a path.
    Parameters:
      `aPath` - the path of the node. The path must be relative to the path of the current widget.
    Throws:
      `PathAccessException` - to report that the path is invalid.
    See Also:
      - `SessionPermissions.getNodeAccessPermissionForForm(SchemaNode, Adaptation)`