T - The specific type of context (either ProfileRequestContext or MessageContext)public class ScriptedContextLookupFunction<T extends org.opensaml.messaging.context.BaseContext> extends Object implements com.google.common.base.Function<T,Object>
Function over a BaseContext which calls out to a supplied script.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ENGINE
The default language is Javascript.
|
private Class<T> |
inputClass
What class we want the output to test against.
|
private Logger |
log
Class logger.
|
private String |
logPrefix
Debugging info.
|
private Class |
outputClass
What class we want the output to test against.
|
private net.shibboleth.utilities.java.support.scripting.EvaluableScript |
script
The script we care about.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ScriptedContextLookupFunction(Class<T> inClass,
net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
Constructor.
|
protected |
ScriptedContextLookupFunction(Class<T> inClass,
net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript,
String extraInfo)
Constructor.
|
protected |
ScriptedContextLookupFunction(Class<T> inClass,
net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript,
String extraInfo,
Class outputType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(T context) |
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
inlineMessageContextScript(String scriptSource)
Factory to create
ScriptedContextLookupFunction for MessageContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
inlineMessageContextScript(String scriptSource,
Class outputType)
Factory to create
ScriptedContextLookupFunction for MessageContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
inlineMessageContextScript(String engineName,
String scriptSource)
Factory to create
ScriptedContextLookupFunction for MessageContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
inlineMessageContextScript(String engineName,
String scriptSource,
Class outputType)
Factory to create
ScriptedContextLookupFunction for MessageContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
inlineScript(String scriptSource)
Factory to create
ScriptedContextLookupFunction for ProfileRequestContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
inlineScript(String scriptSource,
Class outputType)
Factory to create
ScriptedContextLookupFunction for ProfileRequestContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
inlineScript(String engineName,
String scriptSource)
Factory to create
ScriptedContextLookupFunction for ProfileRequestContexts from inline data. |
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
inlineScript(String engineName,
String scriptSource,
Class outputType)
Factory to create
ScriptedContextLookupFunction for ProfileRequestContexts from inline data. |
(package private) static ScriptedContextLookupFunction |
resourceMessageContextScript(Resource resource)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
resourceMessageContextScript(Resource resource,
Class outputType)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
resourceMessageContextScript(String engineName,
Resource resource)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> |
resourceMessageContextScript(String engineName,
Resource resource,
Class outputType)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
resourceScript(Resource resource)
Factory to create
ScriptedContextLookupFunction from a Resource. |
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
resourceScript(Resource resource,
Class outputType)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
resourceScript(String engineName,
Resource resource)
|
(package private) static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> |
resourceScript(String engineName,
Resource resource,
Class outputType)
|
@Nonnull @NotEmpty public static final String DEFAULT_ENGINE
@Nonnull private final net.shibboleth.utilities.java.support.scripting.EvaluableScript script
protected ScriptedContextLookupFunction(@Nonnull Class<T> inClass, @Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript, @Nullable String extraInfo)
inClass - the class we accept as input.theScript - the script we will evaluate.extraInfo - debugging information.protected ScriptedContextLookupFunction(@Nonnull Class<T> inClass, @Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
inClass - the class we accept as input.theScript - the script we will evaluate.protected ScriptedContextLookupFunction(@Nonnull Class<T> inClass, @Nonnull net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript, @Nullable String extraInfo, @Nullable Class outputType)
inClass - the class we accept as input.theScript - the script we will evaluate.extraInfo - debugging information.outputType - the type to test against.static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> resourceScript(@Nonnull@NotEmpty String engineName, @Nonnull Resource resource) throws ScriptException, IOException
resource - the resource to look atengineName - the languageScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> resourceScript(@Nonnull@NotEmpty String engineName, @Nonnull Resource resource, @Nullable Class outputType) throws ScriptException, IOException
resource - the resource to look atengineName - the languageoutputType - the type to test against.ScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> resourceScript(Resource resource) throws ScriptException, IOException
ScriptedContextLookupFunction from a Resource.resource - the resource to look atScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> resourceScript(Resource resource, @Nullable Class outputType) throws ScriptException, IOException
resource - the resource to look atoutputType - the type to test against.ScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> inlineScript(@Nonnull@NotEmpty String engineName, @Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedContextLookupFunction for ProfileRequestContexts from inline data.scriptSource - the script, as a stringengineName - the languageScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> inlineScript(@Nonnull@NotEmpty String engineName, @Nonnull@NotEmpty String scriptSource, @Nullable Class outputType) throws ScriptException
ScriptedContextLookupFunction for ProfileRequestContexts from inline data.scriptSource - the script, as a stringengineName - the languageoutputType - the type to test against.ScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> inlineScript(@Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedContextLookupFunction for ProfileRequestContexts from inline data.scriptSource - the script, as a stringScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.profile.context.ProfileRequestContext> inlineScript(@Nonnull@NotEmpty String scriptSource, @Nullable Class outputType) throws ScriptException
ScriptedContextLookupFunction for ProfileRequestContexts from inline data.scriptSource - the script, as a stringoutputType - the type to test against.ScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> resourceMessageContextScript(@Nonnull@NotEmpty String engineName, @Nonnull Resource resource) throws ScriptException, IOException
resource - the resource to look atengineName - the languageScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> resourceMessageContextScript(@Nonnull@NotEmpty String engineName, @Nonnull Resource resource, @Nullable Class outputType) throws ScriptException, IOException
resource - the resource to look atengineName - the languageoutputType - the type to test against.ScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction resourceMessageContextScript(Resource resource) throws ScriptException, IOException
resource - the resource to look atScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> resourceMessageContextScript(Resource resource, @Nullable Class outputType) throws ScriptException, IOException
resource - the resource to look atoutputType - the type to test against.ScriptException - if the compile failsIOException - if the file doesn't exist.static ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> inlineMessageContextScript(@Nonnull@NotEmpty String engineName, @Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedContextLookupFunction for MessageContexts from inline data.scriptSource - the script, as a stringengineName - the languageScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> inlineMessageContextScript(@Nonnull@NotEmpty String engineName, @Nonnull@NotEmpty String scriptSource, @Nullable Class outputType) throws ScriptException
ScriptedContextLookupFunction for MessageContexts from inline data.scriptSource - the script, as a stringengineName - the languageoutputType - the type to test against.ScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> inlineMessageContextScript(@Nonnull@NotEmpty String scriptSource) throws ScriptException
ScriptedContextLookupFunction for MessageContexts from inline data.scriptSource - the script, aMessageContexts a stringScriptException - if the compile failsstatic ScriptedContextLookupFunction<org.opensaml.messaging.context.MessageContext> inlineMessageContextScript(@Nonnull@NotEmpty String scriptSource, @Nullable Class outputType) throws ScriptException
ScriptedContextLookupFunction for MessageContexts from inline data.scriptSource - the script, as a stringoutputType - the type to test against.ScriptException - if the compile failsCopyright © 1999–2014. All rights reserved.