org.apache.wsrp4j.producer.provider.pluto.driver
Class DynamicInformationProviderImpl

java.lang.Object
  extended byorg.apache.wsrp4j.producer.provider.pluto.driver.DynamicInformationProviderImpl
All Implemented Interfaces:
org.apache.pluto.services.information.DynamicInformationProvider, WSRPDynamicInformationProvider

public class DynamicInformationProviderImpl
extends java.lang.Object
implements WSRPDynamicInformationProvider

Provides access to information required for portlet rendering.

Version:
$Id: DynamicInformationProviderImpl.java,v 1.12 2005/08/24 14:30:12 cziegeler Exp $

Field Summary
private  boolean isSecure
           
private  java.lang.String[] mimeTypes
           
private  javax.portlet.PortletMode mode
           
private  oasis.names.tc.wsrp.v1.types.PortletContext portletContext
           
private  Provider provider
           
private  oasis.names.tc.wsrp.v1.types.RegistrationContext regContext
           
private  oasis.names.tc.wsrp.v1.types.RuntimeContext runtimeContext
           
private  javax.servlet.http.HttpServletRequest servletRequest
           
private  oasis.names.tc.wsrp.v1.types.UserContext userContext
           
private  javax.portlet.WindowState winState
           
private  java.lang.String wsrpWinState
           
 
Fields inherited from interface org.apache.wsrp4j.producer.provider.pluto.WSRPDynamicInformationProvider
PROVIDER, RENDER_PARAMS, REQUEST
 
Constructor Summary
DynamicInformationProviderImpl(javax.servlet.http.HttpServletRequest request)
          Constructor Creates a new DynamicInformationProviderImpl using the information provided by the servlet request and servlet config.
 
Method Summary
 void changePortletMode(javax.portlet.PortletMode mode)
          Set the portlet mode
 void changePortletWindowState(javax.portlet.WindowState state)
          Set the portlet window state
 java.lang.String getBasePortalURL()
          Returns the base portal URL excluding the context root as it is accessed by the browser, like
http://www.company.com:81
 org.apache.pluto.services.information.PortletActionProvider getPortletActionProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
           
 javax.portlet.PortletMode getPortletMode(org.apache.pluto.om.window.PortletWindow portletWindow)
          Return the portlet mode
 org.apache.pluto.services.information.PortletURLProvider getPortletURL(org.apache.pluto.om.window.PortletWindow portletWindow)
          Return a PortletURLProvider for a given portlet window
 org.apache.pluto.services.information.PortletURLProvider getPortletURLProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
           
 javax.portlet.PortletMode getPreviousPortletMode(org.apache.pluto.om.window.PortletWindow portletWindow)
          Return the previous portlet mode
 javax.portlet.WindowState getPreviousWindowState(org.apache.pluto.om.window.PortletWindow portletWindow)
          Return the previous portlet window state
 java.lang.String getRequestMimeType()
          Return the default MIME type of the request
 org.apache.pluto.services.information.ResourceURLProvider getResourceURLProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
           
 java.lang.String getResponseContentType()
           
 java.util.Iterator getResponseContentTypes()
           
 java.lang.String getResponseMimeType()
          Return the default MIME type of the response
 java.util.Iterator getResponseMimeTypes()
          Return all MIME type of the request
 java.util.Iterator getSupportedPortletModes()
          Return the supported Portlet Modes.
 java.util.Iterator getSupportedWindowStates()
          Return the supported Window States
 javax.portlet.WindowState getWindowState(org.apache.pluto.om.window.PortletWindow portletWindow)
          Return the portlet window state
 boolean isPortletModeAllowed(javax.portlet.PortletMode portletMode)
          Check if a mode is allowed As of now we consider the the mode allowed if it is part of the portlet definition
 boolean isWindowStateAllowed(javax.portlet.WindowState windowState)
          Check if a window state is allowed As of now we consider the the window state allowed if it is part of the portlet definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletRequest

private javax.servlet.http.HttpServletRequest servletRequest

provider

private Provider provider

regContext

private oasis.names.tc.wsrp.v1.types.RegistrationContext regContext

runtimeContext

private oasis.names.tc.wsrp.v1.types.RuntimeContext runtimeContext

userContext

private oasis.names.tc.wsrp.v1.types.UserContext userContext

mode

private javax.portlet.PortletMode mode

winState

private javax.portlet.WindowState winState

wsrpWinState

private java.lang.String wsrpWinState

isSecure

private boolean isSecure

portletContext

private oasis.names.tc.wsrp.v1.types.PortletContext portletContext

mimeTypes

private java.lang.String[] mimeTypes
Constructor Detail

DynamicInformationProviderImpl

public DynamicInformationProviderImpl(javax.servlet.http.HttpServletRequest request)
Constructor Creates a new DynamicInformationProviderImpl using the information provided by the servlet request and servlet config.

Parameters:
request - HttpServletRequest
Method Detail

getPortletURL

public org.apache.pluto.services.information.PortletURLProvider getPortletURL(org.apache.pluto.om.window.PortletWindow portletWindow)
Return a PortletURLProvider for a given portlet window

Parameters:
portletWindow - portlet window
Returns:
PortletURLProvider

changePortletMode

public void changePortletMode(javax.portlet.PortletMode mode)
Set the portlet mode

Parameters:
mode - portlte mode

changePortletWindowState

public void changePortletWindowState(javax.portlet.WindowState state)
Set the portlet window state

Parameters:
state - portlet window state

getRequestMimeType

public java.lang.String getRequestMimeType()
Return the default MIME type of the request

Returns:
String representing a MIME type

getResponseMimeType

public java.lang.String getResponseMimeType()
Return the default MIME type of the response

Returns:
String representing a MIME type

getResponseMimeTypes

public java.util.Iterator getResponseMimeTypes()
Return all MIME type of the request

Returns:
java.util.Enumeration

getPortletMode

public javax.portlet.PortletMode getPortletMode(org.apache.pluto.om.window.PortletWindow portletWindow)
Return the portlet mode

Specified by:
getPortletMode in interface org.apache.pluto.services.information.DynamicInformationProvider
Parameters:
portletWindow - portlet window
Returns:
PortletMode

getPreviousPortletMode

public javax.portlet.PortletMode getPreviousPortletMode(org.apache.pluto.om.window.PortletWindow portletWindow)
Return the previous portlet mode

Parameters:
portletWindow - portlet window
Returns:
PortletMode

getWindowState

public javax.portlet.WindowState getWindowState(org.apache.pluto.om.window.PortletWindow portletWindow)
Return the portlet window state

Specified by:
getWindowState in interface org.apache.pluto.services.information.DynamicInformationProvider
Parameters:
portletWindow - portlet window
Returns:
WindowState

getPreviousWindowState

public javax.portlet.WindowState getPreviousWindowState(org.apache.pluto.om.window.PortletWindow portletWindow)
Return the previous portlet window state

Parameters:
portletWindow - portlet window
Returns:
WindowState

getSupportedPortletModes

public java.util.Iterator getSupportedPortletModes()
Return the supported Portlet Modes. These depend on the mime type of the request

Returns:
Iterator

getBasePortalURL

public java.lang.String getBasePortalURL()
Returns the base portal URL excluding the context root as it is accessed by the browser, like
http://www.company.com:81

Returns:
String the base portal URL

getSupportedWindowStates

public java.util.Iterator getSupportedWindowStates()
Return the supported Window States

Returns:
Iterator

isPortletModeAllowed

public boolean isPortletModeAllowed(javax.portlet.PortletMode portletMode)
Check if a mode is allowed As of now we consider the the mode allowed if it is part of the portlet definition

Specified by:
isPortletModeAllowed in interface org.apache.pluto.services.information.DynamicInformationProvider
Returns:
boolean

isWindowStateAllowed

public boolean isWindowStateAllowed(javax.portlet.WindowState windowState)
Check if a window state is allowed As of now we consider the the window state allowed if it is part of the portlet definition

Specified by:
isWindowStateAllowed in interface org.apache.pluto.services.information.DynamicInformationProvider
Returns:
boolean

getResponseContentType

public java.lang.String getResponseContentType()
Specified by:
getResponseContentType in interface org.apache.pluto.services.information.DynamicInformationProvider

getResponseContentTypes

public java.util.Iterator getResponseContentTypes()
Specified by:
getResponseContentTypes in interface org.apache.pluto.services.information.DynamicInformationProvider

getPortletURLProvider

public org.apache.pluto.services.information.PortletURLProvider getPortletURLProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
Specified by:
getPortletURLProvider in interface org.apache.pluto.services.information.DynamicInformationProvider

getResourceURLProvider

public org.apache.pluto.services.information.ResourceURLProvider getResourceURLProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
Specified by:
getResourceURLProvider in interface org.apache.pluto.services.information.DynamicInformationProvider

getPortletActionProvider

public org.apache.pluto.services.information.PortletActionProvider getPortletActionProvider(org.apache.pluto.om.window.PortletWindow portletWindow)
Specified by:
getPortletActionProvider in interface org.apache.pluto.services.information.DynamicInformationProvider


--