scriptella.execution
Class EtlContext

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

public class EtlContext
extends java.lang.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 Summary
EtlContext()
           
EtlContext(boolean collectStatistics)
           
 
Method Summary
 java.lang.Object getParameter(java.lang.String name)
          Returns the value of parameter specified by name.
 ProgressCallback getProgressCallback()
           
 java.net.URL getScriptFileURL()
           
 Session getSession()
           
 ExecutionStatisticsBuilder getStatisticsBuilder()
           
 java.net.URL resolve(java.lang.String uri)
          Resolves a fileUrl URI relative to base URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EtlContext

public EtlContext()

EtlContext

public EtlContext(boolean collectStatistics)
Method Detail

getParameter

public java.lang.Object getParameter(java.lang.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 java.net.URL getScriptFileURL()
Specified by:
getScriptFileURL in interface DriverContext

resolve

public java.net.URL resolve(java.lang.String uri)
                     throws java.net.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:
java.net.MalformedURLException - if uri is malformed or cannot be resolved.
See Also:
getScriptFileURL()

getStatisticsBuilder

public ExecutionStatisticsBuilder getStatisticsBuilder()

getSession

public Session getSession()


Copyright © Copyright 2006-2009 The Scriptella Project Team.