类 ScriptItemProcessorBuilder<I,O>
- java.lang.Object
- org.springframework.batch.item.support.builder.ScriptItemProcessorBuilder<I,O>
public class ScriptItemProcessorBuilder<I,O> extends java.lang.Object
Creates a fully qualified ScriptItemProcessor.- 从以下版本开始:
- 4.0
- 作者:
- Glenn Renfro
构造器概要
构造器 构造器 说明 ScriptItemProcessorBuilder()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ScriptItemProcessor<I,O>
build()
Returns a fully constructedScriptItemProcessor
.ScriptItemProcessorBuilder<I,O>
itemBindingVariableName(java.lang.String itemBindingVariableName)
Provides the ability to change the key name that scripts use to obtain the current item to process if the variable represented by:ScriptItemProcessor.ITEM_BINDING_VARIABLE_NAME
is not suitable ("item").ScriptItemProcessorBuilder<I,O>
language(java.lang.String language)
Establishes the language of the script.ScriptItemProcessorBuilder<I,O>
scriptResource(org.springframework.core.io.Resource resource)
Sets theResource
location of the script to use.ScriptItemProcessorBuilder<I,O>
scriptSource(java.lang.String scriptSource)
Sets the providedString
as the script source code to use.
构造器详细资料
ScriptItemProcessorBuilder
public ScriptItemProcessorBuilder()
方法详细资料
scriptResource
public ScriptItemProcessorBuilder<I,O> scriptResource(org.springframework.core.io.Resource resource)
Sets theResource
location of the script to use. The script language will be deduced from the filename extension.- 参数:
resource
- theResource
location of the script to use.- 返回:
- this instance for method chaining
- 另请参阅:
ScriptItemProcessor.setScript(Resource)
language
public ScriptItemProcessorBuilder<I,O> language(java.lang.String language)
Establishes the language of the script.- 参数:
language
- the language of the script.- 返回:
- this instance for method chaining
- 另请参阅:
ScriptItemProcessor.setScriptSource(String, String)
scriptSource
public ScriptItemProcessorBuilder<I,O> scriptSource(java.lang.String scriptSource)
Sets the providedString
as the script source code to use. Language must not be null nor empty when using script.- 参数:
scriptSource
- theString
form of the script source code to use.- 返回:
- this instance for method chaining
- 另请参阅:
ScriptItemProcessor.setScriptSource(String, String)
itemBindingVariableName
public ScriptItemProcessorBuilder<I,O> itemBindingVariableName(java.lang.String itemBindingVariableName)
Provides the ability to change the key name that scripts use to obtain the current item to process if the variable represented by:ScriptItemProcessor.ITEM_BINDING_VARIABLE_NAME
is not suitable ("item").- 参数:
itemBindingVariableName
- the desired binding variable name- 返回:
- this instance for method chaining
- 另请参阅:
ScriptItemProcessor.setItemBindingVariableName(String)
build
public ScriptItemProcessor<I,O> build()
Returns a fully constructedScriptItemProcessor
.- 返回:
- a new
ScriptItemProcessor