|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.dispatcher.mapper.CompositeActionMapper
public class CompositeActionMapper
This is an ActionMapper
that could take in ActionMapper
s and consult each ActionMapper
in the order they are given where ActionMapper
with higher order will take precedence.
ActionMapper
s could be configured in 2 ways :-
CompositeActionMapper()
CompositeActionMapper
-
CompositeActionMapper(ActionMapper[])
CompositeActionMapper
does this by reading in the pre-configured ActionMapper
s
through webwork.properties file eg. with
webwork.mapper.class=com.opensymphony.webwork.dispatcher.mapper.CompositeActionMapper webwork.compositeActionMapper.1=com.opensymphony.webwork.dispatcher.mapper.RestfulActionMapper webwork.compositeActionMapper.2=com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapperWe would have configured a CompositeActionMapper, with 2 pre-configured
ActionMapper
s, namely
ActionMapper
with a lower order will be consulted first.
Through constructor (normally for unit testing)
CompositeActionMapper
does this with the pre-configured ActionMapper
s
passed in as an array. The order of the ActionMapper
s is important as they will be consulted
in order.
Nested Class Summary | |
---|---|
protected class |
CompositeActionMapper.ActionMapperInfo
Encapsulate the ActionMapper and its order in this CompositeActionMapper . |
Constructor Summary | |
---|---|
CompositeActionMapper()
Creates an instance of CompositeActionMapper , reading in the pre-configured ActionMapper s
through webwork.properties file eg. |
|
CompositeActionMapper(ActionMapper[] actionMappers)
Creates an instance of CompositeActionMapper with the pre-configured ActionMapper s
passed in as an array. |
Method Summary | |
---|---|
protected List |
getActionMapperInfos()
Returns a list of CompositeActionMapper.ActionMapperInfo , preconfigured in this CompositeActionMapper . |
ActionMapping |
getMapping(HttpServletRequest request)
This method will go through all the pre-configured ActionMapper s in the order defined, and return
the ActionMapping of the first ActionMapper that returns a valid (non-null) ActionMapping |
String |
getUriFromActionMapping(ActionMapping mapping)
This method will go through all the pre-configured ActionMapper s in the order defined, and return
the URI of the first that returns a valid (non-null) URI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeActionMapper()
CompositeActionMapper
, reading in the pre-configured ActionMapper
s
through webwork.properties file eg. with
webwork.mapper.class=com.opensymphony.webwork.dispatcher.mapper.CompositeActionMapper webwork.compositeActionMapper.1=com.opensymphony.webwork.dispatcher.mapper.RestfulActionMapper webwork.compositeActionMapper.2=com.opensymphony.webwork.dispatcher.mapper.DefaultActionMapperWe would have configured a CompositeActionMapper, with 2 pre-configured
ActionMapper
s, namely
ActionMapper
with a lower order will be consulted first.
public CompositeActionMapper(ActionMapper[] actionMappers)
CompositeActionMapper
with the pre-configured ActionMapper
s
passed in as an array. The order of the ActionMapper
s is important as they will be consulted
in order.
actionMappers
- Array of ActionMapper
sMethod Detail |
---|
public ActionMapping getMapping(HttpServletRequest request)
ActionMapper
s in the order defined, and return
the ActionMapping
of the first ActionMapper
that returns a valid (non-null) ActionMapping
getMapping
in interface ActionMapper
request
- HttpServletRequest
public String getUriFromActionMapping(ActionMapping mapping)
ActionMapper
s in the order defined, and return
the URI of the first that returns a valid (non-null) URI.
getUriFromActionMapping
in interface ActionMapper
mapping
- ActionMapping
protected List getActionMapperInfos()
CompositeActionMapper.ActionMapperInfo
, preconfigured in this CompositeActionMapper
.
CompositeActionMapper.ActionMapperInfo
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |