public class ScriptMatchFunctor extends AbstractMatchFunctor
| Modifier and Type | Field and Description |
|---|---|
private CompiledScript |
compiledScript
The compiled form of the script, if the script engine supports compiling.
|
private org.slf4j.Logger |
log
Class logger.
|
private String |
script
The script to execute.
|
private ScriptEngine |
scriptEngine
The script engine to execute the script.
|
private String |
scriptLanguage
The scripting language.
|
| Constructor and Description |
|---|
ScriptMatchFunctor(String language,
String newScript)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
compileScript()
Compiles the script if the scripting engine supports it.
|
protected boolean |
doEvaluatePolicyRequirement(ShibbolethFilteringContext filterContext)
Evaluates this matching criteria.
|
protected boolean |
doEvaluateValue(ShibbolethFilteringContext filterContext,
String attributeId,
Object attributeValue)
Evaluates this matching criteria.
|
protected Boolean |
executeScript(ScriptContext scriptContext)
Executes the functor's script.
|
protected ScriptContext |
getScriptContext(ShibbolethFilteringContext filterContext,
String attributeId,
Object attributeValue)
Creates the script execution context from the resolution context.
|
evaluateDenyRule, evaluatePermitValue, evaluatePolicyRequirementprivate final org.slf4j.Logger log
private String scriptLanguage
private String script
private ScriptEngine scriptEngine
private CompiledScript compiledScript
protected boolean doEvaluateValue(ShibbolethFilteringContext filterContext, String attributeId, Object attributeValue) throws FilterProcessingException
doEvaluateValue in class AbstractMatchFunctorfilterContext - the current filtering contextattributeId - ID of the attribute being evaluatedattributeValue - value of the attribute being evaluatedFilterProcessingException - thrown if the function can not be evaluatedprotected boolean doEvaluatePolicyRequirement(ShibbolethFilteringContext filterContext) throws FilterProcessingException
doEvaluatePolicyRequirement in class AbstractMatchFunctorfilterContext - current filtering contextFilterProcessingException - thrown if the function can not be evaluatedprotected void compileScript()
protected ScriptContext getScriptContext(ShibbolethFilteringContext filterContext, String attributeId, Object attributeValue)
filterContext - current resolution contextattributeId - ID of the attribute currently being evalutedattributeValue - attribute currently being validatedprotected Boolean executeScript(ScriptContext scriptContext) throws FilterProcessingException
scriptContext - the script execution contextFilterProcessingException - thrown if there is a problem evaluating the scriptCopyright © 1999-2015. All Rights Reserved.