Package org.springframework.batch.item.util

# Class ExecutionContextUserSupport

java.lang.Object
org.springframework.batch.item.util.ExecutionContextUserSupport

public class ExecutionContextUserSupport extends Object
Facilitates assigning names to objects persisting data in `ExecutionContext` and generating keys for `ExecutionContext` based on the name.

Author:
  Robert Kasanicky

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExecutionContextUserSupport()`
  `ExecutionContextUserSupport(String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getKey(String suffix)`
  Prefix the argument with `getName()` to create a unique key that can be safely used to identify data stored in `ExecutionContext`.
  `protected String`
  `getName()`
  `void`
  `setName(String name)`

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

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

- ## Constructor Details

  - ### ExecutionContextUserSupport

    public ExecutionContextUserSupport()

  - ### ExecutionContextUserSupport

    public ExecutionContextUserSupport(String name)

- ## Method Details

  - ### getName

    protected String getName()
    Returns:
      name used to uniquely identify this instance's entries in shared context.

  - ### setName

    public void setName(String name)
    Parameters:
      `name` - unique name used to create execution context keys.

  - ### getKey

    public String getKey(String suffix)
    Prefix the argument with `getName()` to create a unique key that can be safely used to identify data stored in `ExecutionContext`.
    Parameters:
      `suffix` - `String` to be used to generate the key.
    Returns:
      the key that was generated based on the name and the suffix.