CONTEXT
- as Context type. See ContextAware
, getInterMediateResults()
public abstract class UsesIntermediateObjectImpl<CONTEXT> extends Object implements UsesIntermediateObject<CONTEXT>
UsesIntermediateObject
Modifier and Type | Field and Description |
---|---|
protected CONTEXT |
intermediateResults |
protected Collection<String> |
resultNamesUsed |
protected Collection<String> |
resultsThatAreOptional |
Constructor and Description |
---|
UsesIntermediateObjectImpl() |
Modifier and Type | Method and Description |
---|---|
protected Object |
determineInput(Object passedInput)
A processor that uses an Intermediate Object will take that from the Map instead of the passed param,
in all probability.
|
protected Object |
getInputFromContext() |
CONTEXT |
getInterMediateResults() |
Collection<String> |
getResultNamesThatAreOptional()
By default matching using
UsesIntermediateObject.getResultNamesUsed() is strict. |
Collection<String> |
getResultNamesUsed()
name(s) of the result variable used (optional & mandatory)
|
void |
setIntermediateResults(CONTEXT intermediateResults)
The value(s) to set for this Before the Operation is performed.
|
void |
setResultNamesThatAreOptional(Collection<String> resultsThatAreOptional)
By default matching using
UsesIntermediateObject.getResultNamesUsed() is strict. |
void |
setResultNamesUsed(Collection<String> resultNamesUsed) |
protected Collection<String> resultNamesUsed
protected CONTEXT intermediateResults
protected Collection<String> resultsThatAreOptional
public Collection<String> getResultNamesUsed()
UsesIntermediateObject
getResultNamesUsed
in interface UsesIntermediateObject<CONTEXT>
public void setIntermediateResults(CONTEXT intermediateResults)
UsesIntermediateObject
setIntermediateResults
in interface UsesIntermediateObject<CONTEXT>
intermediateResults
- - Map of keyName and Valuepublic void setResultNamesUsed(Collection<String> resultNamesUsed)
protected Object getInputFromContext()
protected Object determineInput(Object passedInput)
passedInput
- as Objectpublic CONTEXT getInterMediateResults()
getInterMediateResults
in interface UsesIntermediateObject<CONTEXT>
public Collection<String> getResultNamesThatAreOptional()
UsesIntermediateObject
UsesIntermediateObject.getResultNamesUsed()
is strict. i.e. if a result required is not obtained from the context it should/would result in a RuntimeException
.
UsesIntermediateObject.getResultNamesUsed()
will mute and continue since the instance of AbstractEntityTransformer
is aware that it is optional.
TODO: Add Unit test case for this scenariogetResultNamesThatAreOptional
in interface UsesIntermediateObject<CONTEXT>
public void setResultNamesThatAreOptional(Collection<String> resultsThatAreOptional)
UsesIntermediateObject
UsesIntermediateObject.getResultNamesUsed()
is strict. i.e. if a result required is not obtained from the context it should/would result in a RuntimeException
.
UsesIntermediateObject.getResultNamesUsed()
will mute and continue since the instance of AbstractEntityTransformer
is aware that it is optional.setResultNamesThatAreOptional
in interface UsesIntermediateObject<CONTEXT>
Copyright © 2018. All rights reserved.