Interface ScriptLocation

  • All Known Implementing Classes:
    ClasspathScriptLocation

    public interface ScriptLocation
    Interface encapsulating the location of a script and providing access to it.
    Author:
    Roy Wetherall
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()
      Returns an input stream to the contents of the script
      java.lang.String getPath()  
      java.io.Reader getReader()
      Returns a reader to the contents of the script
      boolean isCachable()
      Returns true if the script content is considered cachedable - i.e.
      boolean isSecure()
      Returns true if the script location is considered secure - i.e.
    • Method Detail

      • getInputStream

        java.io.InputStream getInputStream()
        Returns an input stream to the contents of the script
        Returns:
        the input stream
      • getReader

        java.io.Reader getReader()
        Returns a reader to the contents of the script
        Returns:
        the reader
      • getPath

        java.lang.String getPath()
        Returns:
        unique path of this script location
      • isCachable

        boolean isCachable()
        Returns true if the script content is considered cachedable - i.e. classpath located or similar. Else the content will be compiled/interpreted on every execution i.e. repo content.
        Returns:
        true if the script content is considered cachedable, false otherwise
      • isSecure

        boolean isSecure()
        Returns true if the script location is considered secure - i.e. on the repository classpath. Secure scripts may access java.* libraries and instantiate pure Java objects directly. Unsecure scripts only have access to pre-configure host objects and cannot access java.* libs.
        Returns:
        true if the script location is considered secure