public class ScriptedAction extends AbstractProfileAction
The return value must be an event ID to signal. As this is a generic wrapper, the action may return any event depending on the context of the activity, and may manipulate the profile context tree as required.
EventIds.INVALID_PROFILE_CTX| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ENGINE
The default language is Javascript.
|
private Logger |
log
Class logger.
|
private String |
logPrefix
Debugging info.
|
private net.shibboleth.utilities.java.support.scripting.EvaluableScript |
script
The script we care about.
|
| Constructor and Description |
|---|
ScriptedAction(net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
Constructor.
|
ScriptedAction(net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript,
String extraInfo)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileContext) |
(package private) static ScriptedAction |
inlineScript(String scriptSource)
Factory to create
ScriptedAction from inline data. |
(package private) static ScriptedAction |
inlineScript(String engineName,
String scriptSource)
Factory to create
ScriptedAction from inline data. |
(package private) static ScriptedAction |
resourceScript(Resource resource)
Factory to create
ScriptedAction from a Resource. |
(package private) static ScriptedAction |
resourceScript(String engineName,
Resource resource)
Factory to create
ScriptedAction from a Resource. |
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getResult, setMessageSource, setProfileContextLookupStrategydoPreExecute, getActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull @NotEmpty public static final String DEFAULT_ENGINE
@Nonnull private final net.shibboleth.utilities.java.support.scripting.EvaluableScript script
public ScriptedAction(@Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript, @Nullable String extraInfo)
theScript - the script we will evaluate.extraInfo - debugging information.public ScriptedAction(@Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
theScript - the script we will evaluate.public void doExecute(@Nullable org.opensaml.profile.context.ProfileRequestContext profileContext)
doExecute in class org.opensaml.profile.action.AbstractProfileActionstatic ScriptedAction resourceScript(@Nonnull@NotEmpty String engineName, @Nonnull Resource resource) throws ScriptException, IOException
ScriptedAction from a Resource.resource - the resource to look atengineName - the languageScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedAction resourceScript(@Nonnull Resource resource) throws ScriptException, IOException
ScriptedAction from a Resource.resource - the resource to look atScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedAction inlineScript(@Nonnull@NotEmpty String engineName, @Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedAction from inline data.scriptSource - the script, as a stringengineName - the languageScriptException - if the compile failsstatic ScriptedAction inlineScript(@Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedAction from inline data.scriptSource - the script, as a stringScriptException - if the compile failsCopyright © 1999–2014. All rights reserved.