org.exoplatform.services.portletcontainer.plugins.pc
Class PortletContainerDispatcher

java.lang.Object
  extended by org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin, PortletContainerPlugin

public class PortletContainerDispatcher
extends Object
implements PortletContainerPlugin

Created by the Exo Development team. Author : Mestrallet Benjamin


Nested Class Summary
 class PortletContainerDispatcher.ExceptionHolder
           
 
Field Summary
static String ATTRS
          Attrs attribute.
static String BUNDLE
          Bundle attribute.
protected  org.exoplatform.container.ExoContainer container
          Exo container.
static String CONTAINER
          Container attribute.
static String EXCEPTION
          Portlet processing exception.
static String INPUT
          Input attribute.
static String IS_ACTION
          Action type attribute.
static String IS_TO_GET_BUNDLE
          Is to get bundle attribute.
static String LOCALE_FOR_BUNDLE
          Locale attribute.
static String OUTPUT
          Output attribute.
static String PORTLET_APPLICATION_NAME
          Portlet app name attribute.
static String PORTLET_NAME
          Portlet name attribute.
static String SERVLET_MAPPING
          Servlet mapping attribute.
static String WINDOW_INFO
          Window info attribute.
 
Constructor Summary
PortletContainerDispatcher(PortletContainerConf containerConf, PersistenceManager manager, PortletApplicationsHolder holder, PortletApplicationHandler standAloneHandler, org.exoplatform.container.ExoContainerContext context)
           
 
Method Summary
 Map<String,PortletData> getAllPortletMetaData()
          Overridden method.
 ResourceBundle getBundle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String portletAppName, String portletName, Locale locale)
          Overridden method.
 String getDescription()
          Overridden method.
 String getName()
          Overridden method.
 String[] getPortalManagedPortletModes(String portletAppName, String portletName)
          Get portal managed portlet modes.
 PortletApp getPortletApp(String portletAppName)
          Overridden method.
 Collection<String> getPortletAppNames()
          Get portlet app names.
 Collection<javax.portlet.PortletMode> getPortletModes(String portletAppName, String portletName, String markup)
          Overridden method.
 Map<String,String[]> getPortletPreference(Input input)
          Overridden method.
 javax.portlet.PortletPreferences getPortletPreferences(Input input)
          Get portlet preferences.
 Collection<javax.portlet.PortletMode> getSupportedPortletModes()
          Overridden method.
 Collection<javax.portlet.WindowState> getSupportedWindowStates()
          Overridden method.
 Collection<javax.portlet.WindowState> getWindowStates(String portletAppName, String portletName, String markup)
          Overridden method.
static boolean isEventPayloadTypeMatches(List<EventDefinition> eds, Serializable payload, QName eventName)
          Is event payload type matches.
 boolean isEventPayloadTypeMatches(String portletAppName, QName eventName, Serializable payload)
          Overridden method.
 boolean isModeSuported(String portletAppName, String portletName, String markup, javax.portlet.PortletMode mode)
          Overridden method.
 boolean isStateSupported(String portletAppName, String portletName, String markup, javax.portlet.WindowState state)
          Overridden method.
 ActionOutput processAction(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, ActionInput actionInput)
          Overridden method.
 EventOutput processEvent(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, EventInput eventInput)
          Overridden method.
 RenderOutput render(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, RenderInput renderInput)
          Overridden method.
 void sendAttrs(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> attrs, String portletApplicationName)
          Overridden method.
 ResourceOutput serveResource(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, ResourceInput resourceInput)
          Overridden method.
 void setDescription(String description)
          Overridden method.
 void setMajorVersion(int majorVersion)
          Overridden method.
 void setMinorVersion(int minorVersion)
          Overridden method.
 void setName(String name)
          Overridden method.
 void setPortletPreference(Input input, Map<String,String> preferencesMap)
          Overridden method.
 void setPortletPreference2(Input input, Map<String,String[]> preferencesMap)
          Set portlet preference with string array.
 void setPortletPreferences(Input input, javax.portlet.PortletPreferences preferences)
          Set portlet preferences.
 void setProperties(Map<String,String> properties)
          Overridden method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT

public static final String INPUT
Input attribute.

See Also:
Constant Field Values

OUTPUT

public static final String OUTPUT
Output attribute.

See Also:
Constant Field Values

WINDOW_INFO

public static final String WINDOW_INFO
Window info attribute.

See Also:
Constant Field Values

IS_ACTION

public static final String IS_ACTION
Action type attribute.

See Also:
Constant Field Values

IS_TO_GET_BUNDLE

public static final String IS_TO_GET_BUNDLE
Is to get bundle attribute.

See Also:
Constant Field Values

LOCALE_FOR_BUNDLE

public static final String LOCALE_FOR_BUNDLE
Locale attribute.

See Also:
Constant Field Values

BUNDLE

public static final String BUNDLE
Bundle attribute.

See Also:
Constant Field Values

PORTLET_APPLICATION_NAME

public static final String PORTLET_APPLICATION_NAME
Portlet app name attribute.

See Also:
Constant Field Values

PORTLET_NAME

public static final String PORTLET_NAME
Portlet name attribute.

See Also:
Constant Field Values

CONTAINER

public static final String CONTAINER
Container attribute.

See Also:
Constant Field Values

EXCEPTION

public static final String EXCEPTION
Portlet processing exception.

See Also:
Constant Field Values

SERVLET_MAPPING

public static final String SERVLET_MAPPING
Servlet mapping attribute.

See Also:
Constant Field Values

ATTRS

public static final String ATTRS
Attrs attribute.

See Also:
Constant Field Values

container

protected org.exoplatform.container.ExoContainer container
Exo container.

Constructor Detail

PortletContainerDispatcher

public PortletContainerDispatcher(PortletContainerConf containerConf,
                                  PersistenceManager manager,
                                  PortletApplicationsHolder holder,
                                  PortletApplicationHandler standAloneHandler,
                                  org.exoplatform.container.ExoContainerContext context)
Parameters:
containerConf - PC conf
manager - persistence manager
holder - application holder
standAloneHandler - standalone app handler
context - exo container context
Method Detail

setName

public final void setName(String name)
Overridden method.

Specified by:
setName in interface org.exoplatform.container.component.ComponentPlugin
Specified by:
setName in interface PortletContainerPlugin
Parameters:
name - plugin name
See Also:
PortletContainerPlugin.setName(java.lang.String)

getName

public final String getName()
Overridden method.

Specified by:
getName in interface org.exoplatform.container.component.ComponentPlugin
Returns:
plugin name
See Also:
ComponentPlugin.getName()

setDescription

public final void setDescription(String description)
Overridden method.

Specified by:
setDescription in interface org.exoplatform.container.component.ComponentPlugin
Specified by:
setDescription in interface PortletContainerPlugin
Parameters:
description - description
See Also:
PortletContainerPlugin.setDescription(java.lang.String)

getDescription

public final String getDescription()
Overridden method.

Specified by:
getDescription in interface org.exoplatform.container.component.ComponentPlugin
Returns:
description
See Also:
ComponentPlugin.getDescription()

setMajorVersion

public final void setMajorVersion(int majorVersion)
Overridden method.

Specified by:
setMajorVersion in interface PortletContainerPlugin
Parameters:
majorVersion - major version
See Also:
PortletContainerPlugin.setMajorVersion(int)

setMinorVersion

public final void setMinorVersion(int minorVersion)
Overridden method.

Specified by:
setMinorVersion in interface PortletContainerPlugin
Parameters:
minorVersion - minor version
See Also:
PortletContainerPlugin.setMinorVersion(int)

setProperties

public final void setProperties(Map<String,String> properties)
Overridden method.

Specified by:
setProperties in interface PortletContainerPlugin
Parameters:
properties - properties
See Also:
PortletContainerPlugin.setProperties(java.util.Map)

getSupportedPortletModes

public final Collection<javax.portlet.PortletMode> getSupportedPortletModes()
Overridden method.

Specified by:
getSupportedPortletModes in interface PortletContainerPlugin
Returns:
portlet modes
See Also:
PortletContainerPlugin.getSupportedPortletModes()

getSupportedWindowStates

public final Collection<javax.portlet.WindowState> getSupportedWindowStates()
Overridden method.

Specified by:
getSupportedWindowStates in interface PortletContainerPlugin
Returns:
window states
See Also:
PortletContainerPlugin.getSupportedWindowStates()

getPortletModes

public final Collection<javax.portlet.PortletMode> getPortletModes(String portletAppName,
                                                                   String portletName,
                                                                   String markup)
Overridden method.

Specified by:
getPortletModes in interface PortletContainerPlugin
Parameters:
portletAppName - portlet app name
portletName - portlet name
markup - markup
Returns:
portlet modes
See Also:
PortletContainerPlugin.getPortletModes(java.lang.String, java.lang.String, java.lang.String)

getPortalManagedPortletModes

public final String[] getPortalManagedPortletModes(String portletAppName,
                                                   String portletName)
Description copied from interface: PortletContainerPlugin
Get portal managed portlet modes.

Specified by:
getPortalManagedPortletModes in interface PortletContainerPlugin
Returns:

isModeSuported

public final boolean isModeSuported(String portletAppName,
                                    String portletName,
                                    String markup,
                                    javax.portlet.PortletMode mode)
Overridden method.

Specified by:
isModeSuported in interface PortletContainerPlugin
Parameters:
portletAppName - portlet app name
portletName - portlet name
markup - markup
mode - portlet mode
Returns:
is portlet mode supported
See Also:
PortletContainerPlugin.isModeSuported(java.lang.String, java.lang.String, java.lang.String, javax.portlet.PortletMode)

getWindowStates

public final Collection<javax.portlet.WindowState> getWindowStates(String portletAppName,
                                                                   String portletName,
                                                                   String markup)
Overridden method.

Specified by:
getWindowStates in interface PortletContainerPlugin
Parameters:
portletAppName - portlet app name
portletName - portlet name
markup - markup
Returns:
window states
See Also:
PortletContainerPlugin.getWindowStates(java.lang.String, java.lang.String, java.lang.String)

isStateSupported

public final boolean isStateSupported(String portletAppName,
                                      String portletName,
                                      String markup,
                                      javax.portlet.WindowState state)
Overridden method.

Specified by:
isStateSupported in interface PortletContainerPlugin
Parameters:
portletAppName - portlet app name
portletName - portlet name
markup - markup
state - window state
Returns:
is window state supported
See Also:
PortletContainerPlugin.isStateSupported(java.lang.String, java.lang.String, java.lang.String, javax.portlet.WindowState)

getAllPortletMetaData

public final Map<String,PortletData> getAllPortletMetaData()
Overridden method.

Specified by:
getAllPortletMetaData in interface PortletContainerPlugin
Returns:
all portlet metadata
See Also:
PortletContainerPlugin.getAllPortletMetaData()

getPortletAppNames

public final Collection<String> getPortletAppNames()
Get portlet app names.

Specified by:
getPortletAppNames in interface PortletContainerPlugin
Returns:
collection of string

getPortletApp

public final PortletApp getPortletApp(String portletAppName)
Overridden method.

Specified by:
getPortletApp in interface PortletContainerPlugin
Parameters:
portletAppName - portlet application name
Returns:
portlet app object
See Also:
PortletContainerPlugin.getPortletApp(java.lang.String)

isEventPayloadTypeMatches

public final boolean isEventPayloadTypeMatches(String portletAppName,
                                               QName eventName,
                                               Serializable payload)
Overridden method.

Specified by:
isEventPayloadTypeMatches in interface PortletContainerPlugin
Parameters:
portletAppName - portlet application name
eventName - event name
payload - payload
Returns:
is payload type matches
See Also:
PortletContainerPlugin.isEventPayloadTypeMatches(java.lang.String, javax.xml.namespace.QName, Serializable)

isEventPayloadTypeMatches

public static boolean isEventPayloadTypeMatches(List<EventDefinition> eds,
                                                Serializable payload,
                                                QName eventName)
Is event payload type matches. The portlet can send events which are not declared in the portlet deployment descriptor at runtime using the setEvent method on either the ActionResponse or EventResponse. cxlii.

Parameters:
eds -
payload -
eventName -
Returns:
boolean

setPortletPreference

public final void setPortletPreference(Input input,
                                       Map<String,String> preferencesMap)
                                throws PortletContainerException
Overridden method.

Specified by:
setPortletPreference in interface PortletContainerPlugin
Parameters:
input - input
preferencesMap - preferences map
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.setPortletPreference(org.exoplatform.services.portletcontainer.pci.Input, java.util.Map)

getPortletPreference

public final Map<String,String[]> getPortletPreference(Input input)
Overridden method.

Specified by:
getPortletPreference in interface PortletContainerPlugin
Parameters:
input - input
Returns:
portlet preference
See Also:
PortletContainerPlugin.getPortletPreference(org.exoplatform.services.portletcontainer.pci.Input)

getPortletPreferences

public javax.portlet.PortletPreferences getPortletPreferences(Input input)
Description copied from interface: PortletContainerPlugin
Get portlet preferences.

Specified by:
getPortletPreferences in interface PortletContainerPlugin
Parameters:
input - input
Returns:
portlet preferences

setPortletPreference2

public void setPortletPreference2(Input input,
                                  Map<String,String[]> preferencesMap)
                           throws PortletContainerException
Description copied from interface: PortletContainerPlugin
Set portlet preference with string array.

Specified by:
setPortletPreference2 in interface PortletContainerPlugin
Parameters:
input - input
preferencesMap - preferences
Throws:
PortletContainerException - exception

setPortletPreferences

public void setPortletPreferences(Input input,
                                  javax.portlet.PortletPreferences preferences)
                           throws PortletContainerException
Description copied from interface: PortletContainerPlugin
Set portlet preferences.

Specified by:
setPortletPreferences in interface PortletContainerPlugin
Parameters:
input - input
preferences - preferences
Throws:
PortletContainerException - exception

getBundle

public final ResourceBundle getBundle(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      String portletAppName,
                                      String portletName,
                                      Locale locale)
                               throws PortletContainerException
Overridden method.

Specified by:
getBundle in interface PortletContainerPlugin
Parameters:
request - request
response - response
portletAppName - portlet application name
portletName - portlet name
locale - locale
Returns:
resource bundle
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.getBundle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.String, java.util.Locale)

processAction

public final ActionOutput processAction(javax.servlet.http.HttpServletRequest httpServletRequest,
                                        javax.servlet.http.HttpServletResponse httpServletResponse,
                                        ActionInput actionInput)
                                 throws PortletContainerException
Overridden method.

Specified by:
processAction in interface PortletContainerPlugin
Parameters:
httpServletRequest - request
httpServletResponse - response
actionInput - input
Returns:
output
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.processAction(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.exoplatform.services.portletcontainer.pci.ActionInput)

processEvent

public final EventOutput processEvent(javax.servlet.http.HttpServletRequest httpServletRequest,
                                      javax.servlet.http.HttpServletResponse httpServletResponse,
                                      EventInput eventInput)
                               throws PortletContainerException
Overridden method.

Specified by:
processEvent in interface PortletContainerPlugin
Parameters:
httpServletRequest - request
httpServletResponse - response
eventInput - input
Returns:
output
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.processEvent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.exoplatform.services.portletcontainer.pci.EventInput)

render

public final RenderOutput render(javax.servlet.http.HttpServletRequest httpServletRequest,
                                 javax.servlet.http.HttpServletResponse httpServletResponse,
                                 RenderInput renderInput)
                          throws PortletContainerException
Overridden method.

Specified by:
render in interface PortletContainerPlugin
Parameters:
httpServletRequest - requets
httpServletResponse - response
renderInput - input
Returns:
output
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.render(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.exoplatform.services.portletcontainer.pci.RenderInput)

serveResource

public final ResourceOutput serveResource(javax.servlet.http.HttpServletRequest httpServletRequest,
                                          javax.servlet.http.HttpServletResponse httpServletResponse,
                                          ResourceInput resourceInput)
                                   throws PortletContainerException
Overridden method.

Specified by:
serveResource in interface PortletContainerPlugin
Parameters:
httpServletRequest - request
httpServletResponse - response
resourceInput - input
Returns:
output
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.serveResource(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.exoplatform.services.portletcontainer.pci.ResourceInput)

sendAttrs

public final void sendAttrs(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            Map<String,Object> attrs,
                            String portletApplicationName)
                     throws PortletContainerException
Overridden method.

Specified by:
sendAttrs in interface PortletContainerPlugin
Parameters:
request - request
response - response
attrs - attrs
portletApplicationName - portlet application name
Throws:
PortletContainerException - exception
See Also:
PortletContainerPlugin.sendAttrs(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.util.Map, java.lang.String)


Copyright © 2009 eXo Platform SAS. All Rights Reserved.