Class EtlContext

java.lang.Object
scriptella.execution.EtlContext
All Implemented Interfaces:
DriverContext, ParametersCallback

public class EtlContext extends Object implements ParametersCallback, DriverContext
Execution context for script.

This class contains global data for executed elements.
Note: Execution context is not intended to change its state during sql elements execution as opposed to DynamicContext.

Version:
1.0
Author:
Fyodor Kupolov
  • Constructor Details

    • EtlContext

      public EtlContext()
    • EtlContext

      public EtlContext(boolean collectStatistics)
  • Method Details

    • getParameter

      public Object getParameter(String name)
      Description copied from interface: ParametersCallback
      Returns the value of parameter specified by name.

      The callback internally delegates a call to parent callbacks if the parameter cannot be found.

      Specified by:
      getParameter in interface ParametersCallback
      Parameters:
      name - parameter name. Providers are allowed (but not required) to ignore a case of the name parameter to comply with their internal model. For example JDBC drivers are case-insensitive to column names.
      Returns:
      parameter value or null if parameter doesn't exist.
    • getProgressCallback

      public ProgressCallback getProgressCallback()
    • getScriptFileURL

      public URL getScriptFileURL()
      Specified by:
      getScriptFileURL in interface DriverContext
    • resolve

      public URL resolve(String uri) throws MalformedURLException
      Description copied from interface: DriverContext
      Resolves a fileUrl URI relative to base URL.

      Examples:

       baseUrl = "file:///tmp/doc.xml"
       uri = "http://site.com/file.html"
       
      Resolves to: http://site.com/file.html
       baseUrl = "file:///tmp/doc.xml"
       uri = "file.html"
       
      Resolves to: file:///tmp/file.html
      Specified by:
      resolve in interface DriverContext
      Parameters:
      uri - URI to resolve..
      Returns:
      resolved file URL.
      Throws:
      MalformedURLException - if uri is malformed or cannot be resolved.
      See Also:
    • getGlobalVariables

      public Map<String,Object> getGlobalVariables()
    • getStatisticsBuilder

      public ExecutionStatisticsBuilder getStatisticsBuilder()
    • getSession

      public Session getSession()