Class SSIMediator

java.lang.Object
org.apache.catalina.ssi.SSIMediator

public class SSIMediator extends Object
Allows the different SSICommand implementations to share data/talk to each other
Author:
Bip Thelin, Amy Roh, Paul Speed, Dan Sandberg, David Becker
  • Field Details

    • ENCODING_NONE

      protected static final String ENCODING_NONE
      See Also:
    • ENCODING_ENTITY

      protected static final String ENCODING_ENTITY
      See Also:
    • ENCODING_URL

      protected static final String ENCODING_URL
      See Also:
    • DEFAULT_CONFIG_ERR_MSG

      protected static final String DEFAULT_CONFIG_ERR_MSG
      See Also:
    • DEFAULT_CONFIG_TIME_FMT

      protected static final String DEFAULT_CONFIG_TIME_FMT
      See Also:
    • DEFAULT_CONFIG_SIZE_FMT

      protected static final String DEFAULT_CONFIG_SIZE_FMT
      See Also:
    • configErrMsg

      protected String configErrMsg
    • configTimeFmt

      protected String configTimeFmt
    • configSizeFmt

      protected String configSizeFmt
    • className

      protected final String className
    • ssiExternalResolver

      protected final SSIExternalResolver ssiExternalResolver
    • lastModifiedDate

      protected final long lastModifiedDate
    • strftime

      protected Strftime strftime
    • conditionalState

      protected final org.apache.catalina.ssi.SSIConditionalState conditionalState
    • lastMatchCount

      protected int lastMatchCount
  • Constructor Details

    • SSIMediator

      public SSIMediator(SSIExternalResolver ssiExternalResolver, long lastModifiedDate)
  • Method Details

    • setConfigErrMsg

      public void setConfigErrMsg(String configErrMsg)
    • setConfigTimeFmt

      public void setConfigTimeFmt(String configTimeFmt)
    • setConfigTimeFmt

      public void setConfigTimeFmt(String configTimeFmt, boolean fromConstructor)
    • setConfigSizeFmt

      public void setConfigSizeFmt(String configSizeFmt)
    • getConfigErrMsg

      public String getConfigErrMsg()
    • getConfigTimeFmt

      public String getConfigTimeFmt()
    • getConfigSizeFmt

      public String getConfigSizeFmt()
    • getConditionalState

      public org.apache.catalina.ssi.SSIConditionalState getConditionalState()
    • getVariableNames

      public Collection<String> getVariableNames()
    • getFileSize

      public long getFileSize(String path, boolean virtual) throws IOException
      Throws:
      IOException
    • getFileLastModified

      public long getFileLastModified(String path, boolean virtual) throws IOException
      Throws:
      IOException
    • getFileText

      public String getFileText(String path, boolean virtual) throws IOException
      Throws:
      IOException
    • isNameReserved

      protected boolean isNameReserved(String name)
    • getVariableValue

      public String getVariableValue(String variableName)
    • setVariableValue

      public void setVariableValue(String variableName, String variableValue)
    • getVariableValue

      public String getVariableValue(String variableName, String encoding)
    • substituteVariables

      public String substituteVariables(String val)
      Applies variable substitution to the specified String and returns the new resolved string.
      Parameters:
      val - The value which should be checked
      Returns:
      the value after variable substitution
    • formatDate

      protected String formatDate(Date date, TimeZone timeZone)
    • encode

      protected String encode(String value, String encoding)
    • log

      public void log(String message)
    • log

      public void log(String message, Throwable throwable)
    • setDateVariables

      protected void setDateVariables(boolean fromConstructor)
    • clearMatchGroups

      protected void clearMatchGroups()
    • populateMatchGroups

      protected void populateMatchGroups(Matcher matcher)