Interface SSIExternalResolver
- All Known Implementing Classes:
SSIServletExternalResolver
public interface SSIExternalResolver
Interface used by SSIMediator to talk to the 'outside world' ( usually a servlet ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddVariableNames(Collection<String> variableNames) Adds any external variables to the variableNames collection.Returns the current date.longgetFileLastModified(String path, boolean virtual) Returns the last modified timestamp of the specified file.longgetFileSize(String path, boolean virtual) Returns the size of the specified file in bytes.getFileText(String path, boolean virtual) Returns the text content of the specified file.getVariableValue(String name) Returns the value of the named variable, or null if not found.voidLogs a message, optionally with an associated throwable.voidsetVariableValue(String name, String value) Set the named variable to the specified value.
-
Method Details
-
addVariableNames
Adds any external variables to the variableNames collection.- Parameters:
variableNames- the collection to add to
-
getVariableValue
-
setVariableValue
-
getCurrentDate
Date getCurrentDate()Returns the current date. This is useful for putting the SSI stuff in a regression test. Since you can make the current date a constant, it makes testing easier since the output won't change.- Returns:
- the data
-
getFileSize
Returns the size of the specified file in bytes.- Parameters:
path- the file pathvirtual- true for virtual (webapp-relative) path, false for physical path- Returns:
- the file size in bytes
- Throws:
IOException- if the file cannot be accessed
-
getFileLastModified
Returns the last modified timestamp of the specified file.- Parameters:
path- the file pathvirtual- true for virtual (webapp-relative) path, false for physical path- Returns:
- the last modified time in milliseconds
- Throws:
IOException- if the file cannot be accessed
-
getFileText
Returns the text content of the specified file.- Parameters:
path- the file pathvirtual- true for virtual (webapp-relative) path, false for physical path- Returns:
- the file content as a string
- Throws:
IOException- if the file cannot be read
-
log
-