Package net.shibboleth.shared.spring.factory

# Class EvaluableScriptFactoryBean

java.lang.Object
net.shibboleth.shared.spring.factory.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`

public class EvaluableScriptFactoryBean extends AbstractComponentAwareFactoryBean<EvaluableScript>
A factory bean to summon up an `EvaluableScript` from either inline data or from a resource.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`engineName`
The JSR223 engine name.
`private final org.slf4j.Logger`
`log`
log.
`private Resource`
`resource`
The resource which locates the script.
`private String`
`script`
The script.
`private String`
`sourceId`
The source Id.

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`EvaluableScriptFactoryBean()`

## Method Summary

Modifier and Type
Method
Description
`protected EvaluableScript`
`doCreateInstance()`
Call the parent class to create the instance.
`String`
`getEngineName()`
Get the engine Name.
`Class<?>`
`getObjectType()`
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.
`Resource`
`getResource()`
Get the resource which locates the script.
`String`
`getScript()`
Get the script.
`String`
`getSourceId()`
Get the source ID.
`void`
`setEngineName(String what)`
Set the engine name.
`void`
`setResource(Resource what)`
Set the resource which locates the script.
`void`
`setScript(String what)`
Set the script.
`void`
`setSourceId(String what)`
Set the source Id.

### Methods inherited from class net.shibboleth.shared.spring.factory.AbstractComponentAwareFactoryBean

`createInstance, destroyInstance, setThrowIfNull`

### Methods inherited from class net.shibboleth.shared.spring.factory.AbstractFactoryBean

`afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
log.

### resource

@Nullable private Resource resource
The resource which locates the script.

### script

@Nullable private String script
The script.

### engineName

@Nullable private String engineName
The JSR223 engine name.

### sourceId

@Nullable private String sourceId
The source Id.

## Constructor Details

### EvaluableScriptFactoryBean

public EvaluableScriptFactoryBean()

## Method Details

### getResource

@Nullable public Resource getResource()
Get the resource which locates the script.

Returns:
  Returns the resource.

### setResource

public void setResource(@Nullable Resource what)
Set the resource which locates the script.

Parameters:
  `what` - the resource to set.

### getScript

@Nullable public String getScript()
Get the script.

Returns:
  Returns the script as text.

### setScript

public void setScript(@Nullable String what)
Set the script.

Parameters:
  `what` - the script to set.

### getSourceId

@Nullable public String getSourceId()
Get the source ID.

Returns:
  Returns the sourceID.

### setSourceId

public void setSourceId(@Nullable String what)
Set the source Id.

Parameters:
  `what` - the Id to set.

### getEngineName

@Nullable public String getEngineName()
Get the engine Name.

Returns:
  Returns the engine name.

### setEngineName

public void setEngineName(@Nullable String what)
Set the engine name.

Parameters:
  `what` - the engine name to set.

### getObjectType

@Nonnull public Class<?> getObjectType()
This abstract method declaration mirrors the method in the FactoryBean interface, for a consistent offering of abstract template methods.

Specified by:
  `getObjectType` in interface `FactoryBean<EvaluableScript>`
Specified by:
  `getObjectType` in class `AbstractFactoryBean<EvaluableScript>`
See Also:
  - `FactoryBean.getObjectType()`

### doCreateInstance

@Nonnull protected EvaluableScript doCreateInstance() throws Exception
Call the parent class to create the instance.

Specified by:
  `doCreateInstance` in class `AbstractComponentAwareFactoryBean<EvaluableScript>`
Returns:
  the bean.
Throws:
  `Exception` - if needed.