|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match.basic.AbstractMatchFunctor
edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match.basic.ScriptMatchFunctor
public class ScriptMatchFunctor
Match function based on a JSR-268 script.
Field Summary | |
---|---|
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 Summary | |
---|---|
ScriptMatchFunctor(String language,
String newScript)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match.basic.AbstractMatchFunctor |
---|
evaluateDenyRule, evaluatePermitValue, evaluatePolicyRequirement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final org.slf4j.Logger log
private String scriptLanguage
private String script
private ScriptEngine scriptEngine
private CompiledScript compiledScript
Constructor Detail |
---|
public ScriptMatchFunctor(String language, String newScript)
language
- the scripting languagenewScript
- the script to executeMethod Detail |
---|
protected boolean doEvaluateValue(ShibbolethFilteringContext filterContext, String attributeId, Object attributeValue) throws FilterProcessingException
doEvaluateValue
in class AbstractMatchFunctor
filterContext
- the current filtering contextattributeId
- ID of the attribute being evaluatedattributeValue
- value of the attribute being evaluated
FilterProcessingException
- thrown if the function can not be evaluatedprotected boolean doEvaluatePolicyRequirement(ShibbolethFilteringContext filterContext) throws FilterProcessingException
doEvaluatePolicyRequirement
in class AbstractMatchFunctor
filterContext
- current filtering context
FilterProcessingException
- 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 validated
protected Boolean executeScript(ScriptContext scriptContext) throws FilterProcessingException
scriptContext
- the script execution context
FilterProcessingException
- thrown if there is a problem evaluating the script
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |