Class 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 Details

    • log

      private final org.slf4j.Logger log
      log.
    • resource

      private Resource resource
      The resource which locates the script.
    • script

      private String script
      The script.
    • engineName

      private String engineName
      The JSR223 engine name.
    • sourceId

      private String sourceId
      The source Id.
  • Constructor Details

    • EvaluableScriptFactoryBean

      public EvaluableScriptFactoryBean()
  • Method Details

    • getResource

      public Resource getResource()
      Get the resource which locates the script.
      Returns:
      Returns the resource.
    • setResource

      public void setResource​(Resource what)
      Set the resource which locates the script.
      Parameters:
      what - the resource to set.
    • getScript

      public String getScript()
      Get the script.
      Returns:
      Returns the script as text.
    • setScript

      public void setScript​(String what)
      Set the script.
      Parameters:
      what - the script to set.
    • getSourceId

      public String getSourceId()
      Get the source ID.
      Returns:
      Returns the sourceID.
    • setSourceId

      public void setSourceId​(String what)
      Set the source Id.
      Parameters:
      what - the Id to set.
    • getEngineName

      public String getEngineName()
      Get the engine Name.
      Returns:
      Returns the engine name.
    • setEngineName

      public void setEngineName​(String what)
      Set the engine name.
      Parameters:
      what - the engine name to set.
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<EvaluableScript>
      Specified by:
      getObjectType in class AbstractFactoryBean<EvaluableScript>
    • doCreateInstance

      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.