Class RandomizedTextRewriteMap
- java.lang.Object
-
- org.apache.catalina.valves.rewrite.RandomizedTextRewriteMap
-
- All Implemented Interfaces:
RewriteMap
public class RandomizedTextRewriteMap extends java.lang.Object implements RewriteMap
Implement a map for the txt: and rnd: mod_rewrite capabilities.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringManager
sm
-
Constructor Summary
Constructors Constructor Description RandomizedTextRewriteMap(java.lang.String txtFilePath, boolean useRandom)
Create a map from a text file according to the mod_rewrite syntax.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
lookup(java.lang.String key)
Maps a key to a replacement value.
The method is free to returnnull
to indicate, that the default value from theRewriteRule
directive should be used.java.lang.String
setParameters(java.lang.String params)
Optional parameter that can be defined through theRewriteMap
directive in therewrite.config
file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.catalina.valves.rewrite.RewriteMap
setParameters
-
-
-
-
Field Detail
-
sm
protected static final StringManager sm
-
-
Method Detail
-
setParameters
public java.lang.String setParameters(java.lang.String params)
Description copied from interface:RewriteMap
Optional parameter that can be defined through theRewriteMap
directive in therewrite.config
file.- Specified by:
setParameters
in interfaceRewriteMap
- Parameters:
params
- the optional parameter- Returns:
- value is currently ignored
-
lookup
public java.lang.String lookup(java.lang.String key)
Description copied from interface:RewriteMap
Maps a key to a replacement value.
The method is free to returnnull
to indicate, that the default value from theRewriteRule
directive should be used.- Specified by:
lookup
in interfaceRewriteMap
- Parameters:
key
- used by the actual implementation to generate a mapped value- Returns:
- mapped value or
null
-
-