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

      @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:
    • 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.