Class RandomizedTextRewriteMap
java.lang.Object
org.apache.catalina.valves.rewrite.RandomizedTextRewriteMap
- All Implemented Interfaces:
RewriteMap
Implement a map for the txt: and rnd: mod_rewrite capabilities.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRandomizedTextRewriteMap(String txtFilePath, boolean useRandom) Create a map from a text file according to the mod_rewrite syntax. -
Method Summary
Modifier and TypeMethodDescriptionMaps a key to a replacement value.
The method is free to returnnullto indicate, that the default value from theRewriteRuledirective should be used.setParameters(String params) Optional parameter that can be defined through theRewriteMapdirective in therewrite.configfile.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.catalina.valves.rewrite.RewriteMap
setParameters
-
Field Details
-
sm
-
-
Constructor Details
-
RandomizedTextRewriteMap
Create a map from a text file according to the mod_rewrite syntax.- Parameters:
txtFilePath- the text file pathuseRandom- if the map should produce random results
-
-
Method Details
-
setParameters
Description copied from interface:RewriteMapOptional parameter that can be defined through theRewriteMapdirective in therewrite.configfile.- Specified by:
setParametersin interfaceRewriteMap- Parameters:
params- the optional parameter- Returns:
- value is currently ignored
-
lookup
Description copied from interface:RewriteMapMaps a key to a replacement value.
The method is free to returnnullto indicate, that the default value from theRewriteRuledirective should be used.- Specified by:
lookupin interfaceRewriteMap- Parameters:
key- used by the actual implementation to generate a mapped value- Returns:
- mapped value or
null
-