SSIExternalResolver (Apache Tomcat 11.0.21 API Documentation)
Description: declaration: package: org.apache.catalina.ssi, interface: SSIExternalResolver

# 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 Type
  Method
  Description
  `void`
  `addVariableNames(Collection<String> variableNames)`
  Adds any external variables to the variableNames collection.
  `Date`
  `getCurrentDate()`
  Returns the current date.
  `long`
  `getFileLastModified(String path, boolean virtual)`
  `long`
  `getFileSize(String path, boolean virtual)`
  `String`
  `getFileText(String path, boolean virtual)`
  `String`
  `getVariableValue(String name)`
  `void`
  `log(String message, Throwable throwable)`
  `void`
  `setVariableValue(String name, String value)`
  Set the named variable to the specified value.

- ## Method Details

  - ### addVariableNames

    void addVariableNames(Collection<String> variableNames)
    Adds any external variables to the variableNames collection.
    Parameters:
      `variableNames` - the collection to add to

  - ### getVariableValue

    String getVariableValue(String name)

  - ### setVariableValue

    void setVariableValue(String name, String value)
    Set the named variable to the specified value. If value is null, then the variable will be removed ( ie. a call to getVariableValue will return null )
    Parameters:
      `name` - of the variable
      `value` - of the variable

  - ### 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

    long getFileSize(String path, boolean virtual) throws IOException
    Throws:
      `IOException`

  - ### getFileLastModified

    long getFileLastModified(String path, boolean virtual) throws IOException
    Throws:
      `IOException`

  - ### getFileText

    String getFileText(String path, boolean virtual) throws IOException
    Throws:
      `IOException`

  - ### log

    void log(String message, Throwable throwable)