KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > ssi > SSIExternalResolver


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

11 package org.apache.catalina.ssi;
12
13
14 import java.io.IOException JavaDoc;
15 import java.util.Collection JavaDoc;
16 import java.util.Date JavaDoc;
17 /**
18  * Interface used by SSIMediator to talk to the 'outside world' ( usually a
19  * servlet )
20  *
21  * @author Dan Sandberg
22  * @version $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
23  */

24 public interface SSIExternalResolver {
25     /**
26      * Adds any external variables to the variableNames collection.
27      *
28      * @param variableNames
29      * the collection to add to
30      */

31     public void addVariableNames(Collection JavaDoc variableNames);
32
33
34     public String JavaDoc getVariableValue(String JavaDoc name);
35
36
37     /**
38      * Set the named variable to the specified value. If value is null, then
39      * the variable will be removed ( ie. a call to getVariableValue will
40      * return null )
41      *
42      * @param name
43      * of the variable
44      * @param value
45      * of the variable
46      */

47     public void setVariableValue(String JavaDoc name, String JavaDoc value);
48
49
50     /**
51      * Returns the current date. This is useful for putting the SSI stuff in a
52      * regression test. Since you can make the current date a constant, it
53      * makes testing easier since the output won't change.
54      *
55      * @return the data
56      */

57     public Date JavaDoc getCurrentDate();
58
59
60     public long getFileSize(String JavaDoc path, boolean virtual) throws IOException JavaDoc;
61
62
63     public long getFileLastModified(String JavaDoc path, boolean virtual)
64             throws IOException JavaDoc;
65
66
67     public String JavaDoc getFileText(String JavaDoc path, boolean virtual) throws IOException JavaDoc;
68
69
70     public void log(String JavaDoc message, Throwable JavaDoc throwable);
71 }
Popular Tags