Package org.zkoss.bind.impl

## Class BindContextImpl

- java.lang.Object
- - org.zkoss.bind.impl.BindContextImpl

- All Implemented Interfaces:
    `java.io.Serializable`, `BindContext`

      public class BindContextImpl
      extends java.lang.Object
      implements BindContext, java.io.Serializable

  Implementation of `BindContext`.
  Since:
    6.0.0
  Author:
    henrichen
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `BINDING_ARGS` |
    `static java.lang.String` | `COMMAND_ARGS` |
    `static java.lang.String` | `CONVERTER_ARGS` |
    `static java.lang.String` | `VALIDATOR_ARGS` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BindContextImpl​(Binder binder, Binding binding, boolean save, java.lang.String command, Component comp, Event event)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getAttribute​(java.lang.Object key)` | Returns value of the given key in this Bind Context.
    `java.util.Map<java.lang.Object,​java.lang.Object>` | `getAttributes()` | Returns a copy of all attributes in this Bind context.
    `Binder` | `getBinder()` | Returns associated Binder of this Bind context.
    `Binding` | `getBinding()` | Returns associated Binding of this Bind context.
    `java.lang.Object` | `getBindingArg​(java.lang.String key)` | Returns binding arg value of the given key in this Bind Context.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getBindingArgs()` |
    `java.lang.Object` | `getCommandArg​(java.lang.String key)` | Returns command arg value of the given key in this Bind Context.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getCommandArgs()` |
    `java.lang.String` | `getCommandName()` | Returns associated command name of this Bind Context; null if not involved.
    `Component` | `getComponent()` | Returns the associated component context.
    `java.lang.Object` | `getConverterArg​(java.lang.String key)` | Returns converter arg value of the given key in this Bind Context.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getConverterArgs()` |
    `Event` | `getTriggerEvent()` | Returns associated event that trigger the associated command; null if not involved.
    `java.lang.Object` | `getValidatorArg​(java.lang.String key)` | Returns validator arg value of the given key in this Bind Context.
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getValidatorArgs()` |
    `boolean` | `isSave()` | Returns whether currently is doing save operation.
    `java.lang.Object` | `setAttribute​(java.lang.Object key, java.lang.Object value)` | Sets given value to the given key in this Bind context.

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

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

- - ### Field Detail

    - #### COMMAND_ARGS

          public static final java.lang.String COMMAND_ARGS

      See Also:
        Constant Field Values

    - #### BINDING_ARGS

          public static final java.lang.String BINDING_ARGS

      See Also:
        Constant Field Values

    - #### VALIDATOR_ARGS

          public static final java.lang.String VALIDATOR_ARGS

      See Also:
        Constant Field Values

    - #### CONVERTER_ARGS

          public static final java.lang.String CONVERTER_ARGS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BindContextImpl

          public BindContextImpl​(Binder binder,
                                 Binding binding,
                                 boolean save,
                                 java.lang.String command,
                                 Component comp,
                                 Event event)

  - ### Method Detail

    - #### getBinder

          public Binder getBinder()

      Description copied from interface: `BindContext`
      Returns associated Binder of this Bind context.
      Specified by:
        `getBinder` in interface `BindContext`
      Returns:
        associated Binder of this Bind context.

    - #### getBinding

          public Binding getBinding()

      Description copied from interface: `BindContext`
      Returns associated Binding of this Bind context.
      Specified by:
        `getBinding` in interface `BindContext`
      Returns:
        associated Binding of this Bind context.

    - #### getAttribute

          public java.lang.Object getAttribute​(java.lang.Object key)

      Description copied from interface: `BindContext`
      Returns value of the given key in this Bind Context.
      Specified by:
        `getAttribute` in interface `BindContext`
      Parameters:
        `key` - the key to the value.
      Returns:
        value of the given key in this Bind Context.

    - #### setAttribute

          public java.lang.Object setAttribute​(java.lang.Object key,
                                               java.lang.Object value)

      Description copied from interface: `BindContext`
      Sets given value to the given key in this Bind context.
      Specified by:
        `setAttribute` in interface `BindContext`
      Parameters:
        `key` - the key to the value
        `value` - the value
      Returns:
        previous value that associated with the given key.

    - #### getAttributes

          public java.util.Map<java.lang.Object,​java.lang.Object> getAttributes()

      Description copied from interface: `BindContext`
      Returns a copy of all attributes in this Bind context.
      Specified by:
        `getAttributes` in interface `BindContext`
      Returns:
        a copy of all attributes in this Bind context.

    - #### getCommandArg

          public java.lang.Object getCommandArg​(java.lang.String key)

      Description copied from interface: `BindContext`
      Returns command arg value of the given key in this Bind Context.
      Specified by:
        `getCommandArg` in interface `BindContext`
      Parameters:
        `key` - the key to the value.
      Returns:
        value of command arg of the given key in this Bind Context.

    - #### getBindingArg

          public java.lang.Object getBindingArg​(java.lang.String key)

      Description copied from interface: `BindContext`
      Returns binding arg value of the given key in this Bind Context.
      Specified by:
        `getBindingArg` in interface `BindContext`
      Parameters:
        `key` - the key to the value.
      Returns:
        value of binding arg of the given key in this Bind Context.

    - #### getConverterArg

          public java.lang.Object getConverterArg​(java.lang.String key)

      Description copied from interface: `BindContext`
      Returns converter arg value of the given key in this Bind Context.
      Specified by:
        `getConverterArg` in interface `BindContext`
      Parameters:
        `key` - the key to the value.
      Returns:
        value of converter arg of the given key in this Bind Context.

    - #### getValidatorArg

          public java.lang.Object getValidatorArg​(java.lang.String key)

      Description copied from interface: `BindContext`
      Returns validator arg value of the given key in this Bind Context.
      Specified by:
        `getValidatorArg` in interface `BindContext`
      Parameters:
        `key` - the key to the value.
      Returns:
        value of validator arg of the given key in this Bind Context.

    - #### getCommandArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getCommandArgs()

    - #### getBindingArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getBindingArgs()

    - #### getConverterArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getConverterArgs()

    - #### getValidatorArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getValidatorArgs()

    - #### isSave

          public boolean isSave()

      Description copied from interface: `BindContext`
      Returns whether currently is doing save operation.
      Specified by:
        `isSave` in interface `BindContext`
      Returns:
        whether currently is doing save operation.

    - #### getCommandName

          public java.lang.String getCommandName()

      Description copied from interface: `BindContext`
      Returns associated command name of this Bind Context; null if not involved.
      Specified by:
        `getCommandName` in interface `BindContext`
      Returns:
        associated command name of this Bind Context; null if not involved.

    - #### getComponent

          public Component getComponent()

      Description copied from interface: `BindContext`
      Returns the associated component context.
      Specified by:
        `getComponent` in interface `BindContext`
      Returns:
        the associated component context.

    - #### getTriggerEvent

          public Event getTriggerEvent()

      Description copied from interface: `BindContext`
      Returns associated event that trigger the associated command; null if not involved.
      Specified by:
        `getTriggerEvent` in interface `BindContext`
      Returns:
        associated event that trigger the associated command; null if not involved.