|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.magnolia.cms.beans.config.RegexpVirtualURIMapping
info.magnolia.cms.beans.config.RotatingVirtualURIMapping
public class RotatingVirtualURIMapping
An extension of RegexpVirtualURIMapping
that allows a rotation between different destination urls. In order
to rotate toURI
must contain the *
that will be replaced by a random number between
start
(default is 1
) and end
(defaults is 3
).
An additional property padding
can specify the left 0 padding for numbers (defaults is 2
).
So for example a destination url like forward:/banner/image_*.jpg
will randomly forward the request to
/banner/image_01.jpg
, /banner/image_02.jpg
or /banner/image_03.jpg
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface info.magnolia.cms.beans.config.VirtualURIMapping |
---|
VirtualURIMapping.MappingResult |
Constructor Summary | |
---|---|
RotatingVirtualURIMapping()
|
Method Summary | |
---|---|
VirtualURIMapping.MappingResult |
mapURI(java.lang.String uri)
|
void |
setEnd(int end)
Sets the end. |
void |
setPadding(int padding)
Sets the padding. |
void |
setStart(int start)
Sets the start. |
Methods inherited from class info.magnolia.cms.beans.config.RegexpVirtualURIMapping |
---|
getFromURI, getToURI, setFromURI, setToURI, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RotatingVirtualURIMapping()
Method Detail |
---|
public void setStart(int start)
start
- the start to setpublic void setEnd(int end)
end
- the end to setpublic void setPadding(int padding)
padding
- the padding to setpublic VirtualURIMapping.MappingResult mapURI(java.lang.String uri)
mapURI
in interface VirtualURIMapping
mapURI
in class RegexpVirtualURIMapping
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |