org.apache.catalina.ssi

Class SSIMediator


public class SSIMediator
extends java.lang.Object

Allows the different SSICommand implementations to share data/talk to each other

Version:
$Revision: 1.3.2.1 $, $Date: 2004/09/01 16:31:01 $

Authors:
Bip Thelin
Amy Roh
Paul Speed
Dan Sandberg

Field Summary

protected static String
DEFAULT_CONFIG_ERR_MSG
protected static String
DEFAULT_CONFIG_SIZE_FMT
protected static String
DEFAULT_CONFIG_TIME_FMT
protected String
className
protected org.apache.catalina.ssi.SSIConditionalState
conditionalState
protected String
configErrMsg
protected String
configSizeFmt
protected String
configTimeFmt
protected int
debug
protected Date
lastModifiedDate
protected SSIExternalResolver
ssiExternalResolver
protected Strftime
strftime
protected static URLEncoder
urlEncoder

Constructor Summary

SSIMediator(SSIExternalResolver ssiExternalResolver, Date lastModifiedDate, int debug)

Method Summary

protected String
encode(String value, String encoding)
protected String
formatDate(Date date, TimeZone timeZone)
org.apache.catalina.ssi.SSIConditionalState
getConditionalState()
String
getConfigErrMsg()
String
getConfigSizeFmt()
String
getConfigTimeFmt()
long
getFileLastModified(String path, boolean virtual)
long
getFileSize(String path, boolean virtual)
String
getFileText(String path, boolean virtual)
Collection
getVariableNames()
String
getVariableValue(String variableName)
String
getVariableValue(String variableName, String encoding)
protected boolean
isNameReserved(String name)
void
log(String message)
void
log(String message, Throwable throwable)
void
setConfigErrMsg(String configErrMsg)
void
setConfigSizeFmt(String configSizeFmt)
void
setConfigTimeFmt(String configTimeFmt)
void
setConfigTimeFmt(String configTimeFmt, boolean fromConstructor)
protected void
setDateVariables(boolean fromConstructor)
void
setVariableValue(String variableName, String variableValue)
String
substituteVariables(String val)
Applies variable substitution to the specified String and returns the new resolved string.

Field Details

DEFAULT_CONFIG_ERR_MSG

protected static final String DEFAULT_CONFIG_ERR_MSG


DEFAULT_CONFIG_SIZE_FMT

protected static final String DEFAULT_CONFIG_SIZE_FMT


DEFAULT_CONFIG_TIME_FMT

protected static final String DEFAULT_CONFIG_TIME_FMT


className

protected String className


conditionalState

protected org.apache.catalina.ssi.SSIConditionalState conditionalState


configErrMsg

protected String configErrMsg


configSizeFmt

protected String configSizeFmt


configTimeFmt

protected String configTimeFmt


debug

protected int debug


lastModifiedDate

protected Date lastModifiedDate


ssiExternalResolver

protected SSIExternalResolver ssiExternalResolver


strftime

protected Strftime strftime


urlEncoder

protected static URLEncoder urlEncoder

Constructor Details

SSIMediator

public SSIMediator(SSIExternalResolver ssiExternalResolver,
                   Date lastModifiedDate,
                   int debug)

Method Details

encode

protected String encode(String value,
                        String encoding)


formatDate

protected String formatDate(Date date,
                            TimeZone timeZone)


getConditionalState

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


getConfigErrMsg

public String getConfigErrMsg()


getConfigSizeFmt

public String getConfigSizeFmt()


getConfigTimeFmt

public String getConfigTimeFmt()


getFileLastModified

public long getFileLastModified(String path,
                                boolean virtual)
            throws IOException


getFileSize

public long getFileSize(String path,
                        boolean virtual)
            throws IOException


getFileText

public String getFileText(String path,
                          boolean virtual)
            throws IOException


getVariableNames

public Collection getVariableNames()


getVariableValue

public String getVariableValue(String variableName)


getVariableValue

public String getVariableValue(String variableName,
                               String encoding)


isNameReserved

protected boolean isNameReserved(String name)


log

public void log(String message)


log

public void log(String message,
                Throwable throwable)


setConfigErrMsg

public void setConfigErrMsg(String configErrMsg)


setConfigSizeFmt

public void setConfigSizeFmt(String configSizeFmt)


setConfigTimeFmt

public void setConfigTimeFmt(String configTimeFmt)


setConfigTimeFmt

public void setConfigTimeFmt(String configTimeFmt,
                             boolean fromConstructor)


setDateVariables

protected void setDateVariables(boolean fromConstructor)


setVariableValue

public void setVariableValue(String variableName,
                             String variableValue)


substituteVariables

public String substituteVariables(String val)
Applies variable substitution to the specified String and returns the new resolved string.


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.