|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn<BaseAttribute>
edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition
edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.ScriptedAttributeDefinition
public class ScriptedAttributeDefinition
An attribute definition the computes the attribute definition by executing a script written in some JSR-223 supporting language.
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 | |
---|---|
ScriptedAttributeDefinition(String language)
Constructor. |
Method Summary | |
---|---|
protected void |
compileScript()
Compiles the script if the scripting engine supports it. |
protected BaseAttribute<?> |
doResolve(ShibbolethResolutionContext resolutionContext)
Creates and populates the values for the resolved attribute. |
String |
getScript()
Gets the script that will be executed. |
protected ScriptContext |
getScriptContext(ShibbolethResolutionContext resolutionContext)
Creates the script execution context from the resolution context. |
String |
getScriptLanguage()
Gets the scripting language used. |
void |
initialize()
Initializes this attribute definition. |
void |
setScript(String newScript)
Sets the script that will be executed. |
void |
validate()
Validate the internal state of this plug-in. |
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.attributeDefinition.BaseAttributeDefinition |
---|
getAttributeEncoders, getDisplayDescriptions, getDisplayNames, getSourceAttributeID, getValuesFromAllDependencies, isDependencyOnly, resolve, setDependencyOnly, setSourceAttributeID |
Methods inherited from class edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.AbstractResolutionPlugIn |
---|
getDependencyIds, getId, getValuesFromAllDependencies, getValuesFromAttributeDependency, getValuesFromConnectorDependency, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ResolutionPlugIn |
---|
getDependencyIds, getId |
Field Detail |
---|
private final org.slf4j.Logger log
private String scriptLanguage
private String script
private ScriptEngine scriptEngine
private CompiledScript compiledScript
Constructor Detail |
---|
public ScriptedAttributeDefinition(String language)
language
- the scripting language that will be usedMethod Detail |
---|
public String getScriptLanguage()
public String getScript()
public void setScript(String newScript)
newScript
- script that will be executedpublic void initialize()
public void validate() throws AttributeResolutionException
AttributeResolutionException
- if the plug-in has an invalid internal stateprotected BaseAttribute<?> doResolve(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
doResolve
in class BaseAttributeDefinition
resolutionContext
- current attribute resolution context
AttributeResolutionException
- thrown if there is a problem resolving and creating the attributeprotected void compileScript()
protected ScriptContext getScriptContext(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
resolutionContext
- current resolution context
AttributeResolutionException
- thrown if dependent data connectors or attribute definitions can not be
resolved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |