T - type of item the stage operates on@ThreadSafe public class ScriptletStage<T> extends BaseStage<T>
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEMS
Name of the scriptlet attribute, "items" , containing the Item collection to be transformed.
|
private Logger |
log
Class logger.
|
private net.shibboleth.utilities.java.support.scripting.EvaluableScript |
script
Script executed by this stage.
|
| Constructor and Description |
|---|
ScriptletStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(Collection<Item<T>> itemCollection)
Performs the stage processing on the given Item collection.
|
protected void |
doInitialize() |
net.shibboleth.utilities.java.support.scripting.EvaluableScript |
getScript()
Gets the script executed by this stage.
|
void |
setScript(net.shibboleth.utilities.java.support.scripting.EvaluableScript stageScript)
Sets the script executed by this stage.
|
execute, getCollectionPredicate, setCollectionPredicatesetIdgetIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedpublic static final String ITEMS
private final Logger log
private net.shibboleth.utilities.java.support.scripting.EvaluableScript script
@Nullable public net.shibboleth.utilities.java.support.scripting.EvaluableScript getScript()
public void setScript(@Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript stageScript)
stageScript - the script executed by this stageprotected void doExecute(@Nonnull@NonnullElements Collection<Item<T>> itemCollection) throws StageProcessingException
The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<T>itemCollection - collection to be processedStageProcessingException - thrown if there is an unrecoverable problem when processing the stageprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionCopyright © 1999–2016. All rights reserved.