KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > scriptella > spi > DriverContext


1 /*
2  * Copyright 2006-2007 The Scriptella Project Team.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 /**
17  * $Header: $
18  * $Revision: $
19  * $Date: $
20  *
21  * Copyright 2003-2005
22  * All rights reserved.
23  */

24 package scriptella.spi;
25
26 import java.net.MalformedURLException JavaDoc;
27 import java.net.URL JavaDoc;
28
29
30 /**
31  * Global ETL Context available to drivers.
32  * @author Fyodor Kupolov
33  * @version 1.0
34  */

35 public interface DriverContext {
36     public URL JavaDoc getScriptFileURL();
37
38
39     /**
40      * Resolves a fileUrl URI relative to base URL.
41      * <p><b>Examples:</b></p>
42      * <code><pre>
43      * baseUrl = "file:///tmp/doc.xml"
44      * uri = "http://site.com/file.html"
45      * </pre></code>
46      * Resolves to: <code>http://site.com/file.html</code>
47      * <code><pre>
48      * baseUrl = "file:///tmp/doc.xml"
49      * uri = "file.html"
50      * </pre></code>
51      * Resolves to: <code>file:///tmp/file.html</code>
52      *
53      * @param uri URI to resolve..
54      * @return resolved file URL.
55      * @see scriptella.execution.EtlContext#getScriptFileURL()
56      * @throws MalformedURLException if uri is malformed or cannot be resolved.
57      */

58     public URL JavaDoc resolve(final String JavaDoc uri) throws MalformedURLException JavaDoc;
59 }
60
Popular Tags