Class ExecutionContextUserSupport
- java.lang.Object
- org.springframework.batch.item.util.ExecutionContextUserSupport
public class ExecutionContextUserSupport extends java.lang.Object
Facilitates assigning names to objects persisting data inExecutionContext
and generating keys forExecutionContext
based on the name.- Author:
- Robert Kasanicky
Constructor Summary
Constructors Constructor Description ExecutionContextUserSupport()
ExecutionContextUserSupport(java.lang.String name)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getKey(java.lang.String suffix)
Prefix the argument withgetName()
to create a unique key that can be safely used to identify data stored inExecutionContext
.protected java.lang.String
getName()
void
setName(java.lang.String name)
Method Detail
getName
protected java.lang.String getName()
- Returns:
- name used to uniquely identify this instance's entries in shared context.
setName
public void setName(java.lang.String name)
- Parameters:
name
- unique name used to create execution context keys.
getKey
public java.lang.String getKey(java.lang.String suffix)
Prefix the argument withgetName()
to create a unique key that can be safely used to identify data stored inExecutionContext
.- Parameters:
suffix
-String
to be used to generate the key.- Returns:
- the key that was generated based on the name and the suffix.