Class ResourceScriptContent

  • All Implemented Interfaces:
    ScriptContent

    public class ResourceScriptContent
    extends java.lang.Object
    implements ScriptContent
    ScriptContent backed by the Spring Resource interface. By using this ScriptContent you can refer to any Script located locally on classpath, on filesystem or remotely.
    See Also:
    Resource
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceScriptContent​(org.springframework.core.io.Resource resource)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getContent()
      Returns content of the script (executable body).
      java.util.Map<java.lang.String,​java.lang.Object> getCustomContext()
      Method which may return context parameters map with some additions related to current implementation of the ScriptContent which will be passed later on to the script.
      java.lang.String getEngineName()
      Gets engine name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceScriptContent

        public ResourceScriptContent​(org.springframework.core.io.Resource resource)
    • Method Detail

      • getEngineName

        public java.lang.String getEngineName()
        Description copied from interface: ScriptContent
        Gets engine name. The name may be full engine name JSR-223 compliant, proper file extension of the script or mime type of the script.
        Specified by:
        getEngineName in interface ScriptContent
      • getContent

        public java.lang.String getContent()
        Description copied from interface: ScriptContent
        Returns content of the script (executable body).
        Specified by:
        getContent in interface ScriptContent
      • getCustomContext

        public java.util.Map<java.lang.String,​java.lang.Object> getCustomContext()
        Description copied from interface: ScriptContent
        Method which may return context parameters map with some additions related to current implementation of the ScriptContent which will be passed later on to the script. In case of none of the parameters are present empty map must be returned.
        Specified by:
        getCustomContext in interface ScriptContent