Package org.apache.catalina.ssi
Class SSIMediator
- java.lang.Object
- 
- org.apache.catalina.ssi.SSIMediator
 
- 
 public class SSIMediator extends java.lang.ObjectAllows the different SSICommand implementations to share data/talk to each other- Author:
- Bip Thelin, Amy Roh, Paul Speed, Dan Sandberg, David Becker
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringclassNameprotected org.apache.catalina.ssi.SSIConditionalStateconditionalStateprotected java.lang.StringconfigErrMsgprotected java.lang.StringconfigSizeFmtprotected java.lang.StringconfigTimeFmtprotected static java.lang.StringDEFAULT_CONFIG_ERR_MSGprotected static java.lang.StringDEFAULT_CONFIG_SIZE_FMTprotected static java.lang.StringDEFAULT_CONFIG_TIME_FMTprotected static java.lang.StringENCODING_ENTITYprotected static java.lang.StringENCODING_NONEprotected static java.lang.StringENCODING_URLprotected intlastMatchCountprotected longlastModifiedDateprotected SSIExternalResolverssiExternalResolverprotected Strftimestrftime
 - 
Constructor SummaryConstructors Constructor Description SSIMediator(SSIExternalResolver ssiExternalResolver, long lastModifiedDate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearMatchGroups()protected java.lang.Stringencode(java.lang.String value, java.lang.String encoding)protected java.lang.StringformatDate(java.util.Date date, java.util.TimeZone timeZone)org.apache.catalina.ssi.SSIConditionalStategetConditionalState()java.lang.StringgetConfigErrMsg()java.lang.StringgetConfigSizeFmt()java.lang.StringgetConfigTimeFmt()longgetFileLastModified(java.lang.String path, boolean virtual)longgetFileSize(java.lang.String path, boolean virtual)java.lang.StringgetFileText(java.lang.String path, boolean virtual)java.util.Collection<java.lang.String>getVariableNames()java.lang.StringgetVariableValue(java.lang.String variableName)java.lang.StringgetVariableValue(java.lang.String variableName, java.lang.String encoding)protected booleanisNameReserved(java.lang.String name)voidlog(java.lang.String message)voidlog(java.lang.String message, java.lang.Throwable throwable)protected voidpopulateMatchGroups(java.util.regex.Matcher matcher)voidsetConfigErrMsg(java.lang.String configErrMsg)voidsetConfigSizeFmt(java.lang.String configSizeFmt)voidsetConfigTimeFmt(java.lang.String configTimeFmt)voidsetConfigTimeFmt(java.lang.String configTimeFmt, boolean fromConstructor)protected voidsetDateVariables(boolean fromConstructor)voidsetVariableValue(java.lang.String variableName, java.lang.String variableValue)java.lang.StringsubstituteVariables(java.lang.String val)Applies variable substitution to the specified String and returns the new resolved string.
 
- 
- 
- 
Field Detail- 
ENCODING_NONEprotected static final java.lang.String ENCODING_NONE - See Also:
- Constant Field Values
 
 - 
ENCODING_ENTITYprotected static final java.lang.String ENCODING_ENTITY - See Also:
- Constant Field Values
 
 - 
ENCODING_URLprotected static final java.lang.String ENCODING_URL - See Also:
- Constant Field Values
 
 - 
DEFAULT_CONFIG_ERR_MSGprotected static final java.lang.String DEFAULT_CONFIG_ERR_MSG - See Also:
- Constant Field Values
 
 - 
DEFAULT_CONFIG_TIME_FMTprotected static final java.lang.String DEFAULT_CONFIG_TIME_FMT - See Also:
- Constant Field Values
 
 - 
DEFAULT_CONFIG_SIZE_FMTprotected static final java.lang.String DEFAULT_CONFIG_SIZE_FMT - See Also:
- Constant Field Values
 
 - 
configErrMsgprotected java.lang.String configErrMsg 
 - 
configTimeFmtprotected java.lang.String configTimeFmt 
 - 
configSizeFmtprotected java.lang.String configSizeFmt 
 - 
classNameprotected final java.lang.String className 
 - 
ssiExternalResolverprotected final SSIExternalResolver ssiExternalResolver 
 - 
lastModifiedDateprotected final long lastModifiedDate 
 - 
strftimeprotected Strftime strftime 
 - 
conditionalStateprotected final org.apache.catalina.ssi.SSIConditionalState conditionalState 
 - 
lastMatchCountprotected int lastMatchCount 
 
- 
 - 
Constructor Detail- 
SSIMediatorpublic SSIMediator(SSIExternalResolver ssiExternalResolver, long lastModifiedDate) 
 
- 
 - 
Method Detail- 
setConfigErrMsgpublic void setConfigErrMsg(java.lang.String configErrMsg) 
 - 
setConfigTimeFmtpublic void setConfigTimeFmt(java.lang.String configTimeFmt) 
 - 
setConfigTimeFmtpublic void setConfigTimeFmt(java.lang.String configTimeFmt, boolean fromConstructor)
 - 
setConfigSizeFmtpublic void setConfigSizeFmt(java.lang.String configSizeFmt) 
 - 
getConfigErrMsgpublic java.lang.String getConfigErrMsg() 
 - 
getConfigTimeFmtpublic java.lang.String getConfigTimeFmt() 
 - 
getConfigSizeFmtpublic java.lang.String getConfigSizeFmt() 
 - 
getConditionalStatepublic org.apache.catalina.ssi.SSIConditionalState getConditionalState() 
 - 
getVariableNamespublic java.util.Collection<java.lang.String> getVariableNames() 
 - 
getFileSizepublic long getFileSize(java.lang.String path, boolean virtual) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getFileLastModifiedpublic long getFileLastModified(java.lang.String path, boolean virtual) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
getFileTextpublic java.lang.String getFileText(java.lang.String path, boolean virtual) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
isNameReservedprotected boolean isNameReserved(java.lang.String name) 
 - 
getVariableValuepublic java.lang.String getVariableValue(java.lang.String variableName) 
 - 
setVariableValuepublic void setVariableValue(java.lang.String variableName, java.lang.String variableValue)
 - 
getVariableValuepublic java.lang.String getVariableValue(java.lang.String variableName, java.lang.String encoding)
 - 
substituteVariablespublic java.lang.String substituteVariables(java.lang.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
 
 - 
formatDateprotected java.lang.String formatDate(java.util.Date date, java.util.TimeZone timeZone)
 - 
encodeprotected java.lang.String encode(java.lang.String value, java.lang.String encoding)
 - 
logpublic void log(java.lang.String message) 
 - 
logpublic void log(java.lang.String message, java.lang.Throwable throwable)
 - 
setDateVariablesprotected void setDateVariables(boolean fromConstructor) 
 - 
clearMatchGroupsprotected void clearMatchGroups() 
 - 
populateMatchGroupsprotected void populateMatchGroups(java.util.regex.Matcher matcher) 
 
- 
 
-