Package org.apache.catalina.ssi
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- Version:
- $Revision: 1.5 $, $Date: 2007/05/05 05:32:20 $
- Author:
- Bip Thelin, Amy Roh, Paul Speed, Dan Sandberg, David Becker
-
-
Field Summary
Fields Modifier and Type Field Description protected StringclassNameprotected org.apache.catalina.ssi.SSIConditionalStateconditionalStateprotected StringconfigErrMsgprotected StringconfigSizeFmtprotected StringconfigTimeFmtprotected static StringDEFAULT_CONFIG_ERR_MSGprotected static StringDEFAULT_CONFIG_SIZE_FMTprotected static StringDEFAULT_CONFIG_TIME_FMTprotected longlastModifiedDateprotected SSIExternalResolverssiExternalResolverprotected Strftimestrftimeprotected static URLEncoderurlEncoder
-
Constructor Summary
Constructors Constructor Description SSIMediator(SSIExternalResolver ssiExternalResolver, long lastModifiedDate, int debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Stringencode(String value, String encoding)protected StringformatDate(Date date, TimeZone timeZone)org.apache.catalina.ssi.SSIConditionalStategetConditionalState()StringgetConfigErrMsg()StringgetConfigSizeFmt()StringgetConfigTimeFmt()longgetFileLastModified(String path, boolean virtual)longgetFileSize(String path, boolean virtual)StringgetFileText(String path, boolean virtual)Collection<String>getVariableNames()StringgetVariableValue(String variableName)StringgetVariableValue(String variableName, String encoding)protected booleanisNameReserved(String name)voidlog(String message)voidlog(String message, Throwable throwable)voidsetConfigErrMsg(String configErrMsg)voidsetConfigSizeFmt(String configSizeFmt)voidsetConfigTimeFmt(String configTimeFmt)voidsetConfigTimeFmt(String configTimeFmt, boolean fromConstructor)protected voidsetDateVariables(boolean fromConstructor)voidsetVariableValue(String variableName, String variableValue)StringsubstituteVariables(String val)Applies variable substitution to the specified String and returns the new resolved string.
-
-
-
Field Detail
-
DEFAULT_CONFIG_ERR_MSG
protected static final String DEFAULT_CONFIG_ERR_MSG
- See Also:
- Constant Field Values
-
DEFAULT_CONFIG_TIME_FMT
protected static final String DEFAULT_CONFIG_TIME_FMT
- See Also:
- Constant Field Values
-
DEFAULT_CONFIG_SIZE_FMT
protected static final String DEFAULT_CONFIG_SIZE_FMT
- See Also:
- Constant Field Values
-
urlEncoder
protected static final URLEncoder urlEncoder
-
configErrMsg
protected String configErrMsg
-
configTimeFmt
protected String configTimeFmt
-
configSizeFmt
protected String configSizeFmt
-
className
protected String className
-
ssiExternalResolver
protected SSIExternalResolver ssiExternalResolver
-
lastModifiedDate
protected long lastModifiedDate
-
strftime
protected Strftime strftime
-
conditionalState
protected org.apache.catalina.ssi.SSIConditionalState conditionalState
-
-
Constructor Detail
-
SSIMediator
public SSIMediator(SSIExternalResolver ssiExternalResolver, long lastModifiedDate, int debug)
-
-
Method Detail
-
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)
-
substituteVariables
public String substituteVariables(String val)
Applies variable substitution to the specified String and returns the new resolved string.
-
log
public void log(String message)
-
setDateVariables
protected void setDateVariables(boolean fromConstructor)
-
-