Class EvaluableScriptFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean<EvaluableScript>
net.shibboleth.shared.spring.factory.EvaluableScriptFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<EvaluableScript>,InitializingBean
A factory bean to summon up an
EvaluableScript from either inline data or from a resource.
TODO: Remove the destroyInstance(EvaluableScript) from this class in V6.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe JSR223 engine name.private final org.slf4j.Loggerlog.private ResourceThe resource which locates the script.private StringThe script.private StringThe source Id.Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddestroyInstance(EvaluableScript instance) We do not call the parent tear down so as to avoid any deprecation logging.protected EvaluableScriptCall the parent class to create the instance.Get the engine Name.Class<?>Get the resource which locates the script.Get the script.Get the source ID.voidsetEngineName(String what) Set the engine name.voidsetResource(Resource what) Set the resource which locates the script.voidSet the script.voidsetSourceId(String what) Set the source Id.Methods inherited from class net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean
createInstance, setThrowIfNullMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger loglog. -
resource
The resource which locates the script. -
script
The script. -
engineName
The JSR223 engine name. -
sourceId
The source Id.
-
-
Constructor Details
-
EvaluableScriptFactoryBean
public EvaluableScriptFactoryBean()
-
-
Method Details
-
getResource
Get the resource which locates the script.- Returns:
- Returns the resource.
-
setResource
Set the resource which locates the script.- Parameters:
what- the resource to set.
-
getScript
Get the script.- Returns:
- Returns the script as text.
-
setScript
Set the script.- Parameters:
what- the script to set.
-
getSourceId
Get the source ID.- Returns:
- Returns the sourceID.
-
setSourceId
Set the source Id.- Parameters:
what- the Id to set.
-
getEngineName
Get the engine Name.- Returns:
- Returns the engine name.
-
setEngineName
Set the engine name.- Parameters:
what- the engine name to set.
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<EvaluableScript>- Specified by:
getObjectTypein classAbstractFactoryBean<EvaluableScript>
-
doCreateInstance
Call the parent class to create the instance.- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<EvaluableScript>- Returns:
- the bean
- Throws:
Exception- if needed
-