public class PortletModeHandlerMapping extends AbstractMapBasedHandlerMapping<javax.portlet.PortletMode>
HandlerMapping interface to map from the current
PortletMode to request handler beans.
The bean configuration for this mapping will look something like this:
<bean id="portletModeHandlerMapping" class="com.liferay.portletmvc4spring.handler.PortletModeHandlerMapping">
<property name="portletModeMap">
<map>
<entry key="view"><ref bean="viewHandler"/></entry>
<entry key="edit"><ref bean="editHandler"/></entry>
<entry key="help"><ref bean="helpHandler"/></entry>
</map>
</property>
</bean>
AbstractMapBasedHandlerMapping.PortletRequestMappingPredicateloggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
PortletModeHandlerMapping() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.portlet.PortletMode |
getLookupKey(javax.portlet.PortletRequest request)
Uses the current PortletMode as lookup key.
|
void |
initApplicationContext()
Calls the
registerHandlers method in addition to the superclass's initialization. |
protected void |
registerHandlersByMode(Map<String,Object> portletModeMap)
Register all handlers specified in the Portlet mode map for the corresponding modes.
|
void |
setMappings(Properties mappings)
Set PortletMode to handler bean name mappings from a Properties object.
|
void |
setPortletModeMap(Map<String,?> portletModeMap)
Set a Map with PortletModes as keys and handler beans as values.
|
getHandlerInternal, registerHandler, registerHandler, registerHandlers, setLazyInitHandlersadaptInterceptor, extendInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getOrder, initInterceptors, setApplyWebRequestInterceptorsToRenderPhaseOnly, setDefaultHandler, setInterceptors, setOrdergetApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContextpublic void initApplicationContext()
throws BeansException
registerHandlers method in addition to the superclass's initialization.initApplicationContext in class AbstractHandlerMappingBeansExceptionAbstractMapBasedHandlerMapping.registerHandlers(java.util.Map<K, ?>)public void setMappings(Properties mappings)
mappings - properties with PortletMode names as keys and bean names as valuespublic void setPortletModeMap(Map<String,?> portletModeMap)
portletModeMap - map with PortletMode names as keys and beans or bean names as valuesprotected javax.portlet.PortletMode getLookupKey(javax.portlet.PortletRequest request)
throws Exception
getLookupKey in class AbstractMapBasedHandlerMapping<javax.portlet.PortletMode>request - current portlet requestnull)Exception - if key computation failedCopyright © 2019 Liferay, Inc.. All rights reserved.