|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.metadata.pipeline.AbstractComponent
net.shibboleth.metadata.pipeline.BaseStage<Item<?>>
net.shibboleth.metadata.pipeline.ScriptletStage
@ThreadSafe public class ScriptletStage
A pipeline stage that computes that transforms the collection of Item via a script.
This stage requires the following properties be set prior to initialization:
scriptFileThis classes uses the JSR-223 scripting interface. As such, in order to use a language other than ECMAscript (a.k.a. javascript), you must ensure the scripting engine and any associated libraries necessary for its operation are on the classpath.
| Field Summary | |
|---|---|
private CompiledScript |
compiledScript
The compiled form of the script, if the script engine supports compiling. |
static String |
ITEM
Name of the scriptlet attribute, "item" , containing the Item collection to be transformed. |
private Logger |
log
Class logger. |
private ScriptEngine |
scriptEngine
The script engine to execute the script. |
private File |
scriptFile
Filesystem path script file. |
private String |
scriptLanguage
Name of the scripting language in use. |
| Constructor Summary | |
|---|---|
ScriptletStage()
|
|
| Method Summary | |
|---|---|
protected void |
doExecute(Collection<Item<?>> itemCollection)
Performs the stage processing on the given Item collection. |
protected void |
doInitialize()
Do the initialization of the component. |
File |
getScriptFile()
Gets the script file used. |
String |
getScriptLanguage()
Gets the scripting language used. |
void |
setScriptFile(File file)
Sets the script file used. |
void |
setScriptLanguage(String language)
Sets the scripting language used. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute |
| Methods inherited from class net.shibboleth.metadata.pipeline.AbstractComponent |
|---|
equals, getId, getInitializationInstant, hashCode, initialize, isInitialized, setId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.shibboleth.metadata.pipeline.Component |
|---|
getId, getInitializationInstant, initialize, isInitialized |
| Field Detail |
|---|
public static final String ITEM
private final Logger log
private String scriptLanguage
ecmascript
private File scriptFile
private ScriptEngine scriptEngine
private CompiledScript compiledScript
| Constructor Detail |
|---|
public ScriptletStage()
| Method Detail |
|---|
public String getScriptLanguage()
public void setScriptLanguage(String language)
language - scripting language usedpublic File getScriptFile()
public void setScriptFile(File file)
file - script file used
protected void doExecute(Collection<Item<?>> itemCollection)
throws StageProcessingException
doExecute in class BaseStage<Item<?>>itemCollection - collection to be processed
StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
protected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractComponentComponentInitializationException - throw if there is a problem initializing the component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||