org.springframework.mock.web.portlet
Class MockPortletConfig

java.lang.Object
  extended by org.springframework.mock.web.portlet.MockPortletConfig
All Implemented Interfaces:
PortletConfig

public class MockPortletConfig
extends java.lang.Object
implements PortletConfig

Mock implementation of the PortletConfig interface.

Since:
2.0
Author:
John A. Lewis, Juergen Hoeller

Field Summary
private  java.util.Map<java.lang.String,java.lang.String[]> containerRuntimeOptions
           
private  java.lang.String defaultNamespace
           
private  java.util.Map<java.lang.String,java.lang.String> initParameters
           
private  PortletContext portletContext
           
private  java.lang.String portletName
           
private  java.util.Set<javax.xml.namespace.QName> processingEventQNames
           
private  java.util.Set<java.lang.String> publicRenderParameterNames
           
private  java.util.Set<javax.xml.namespace.QName> publishingEventQNames
           
private  java.util.Map<java.util.Locale,java.util.ResourceBundle> resourceBundles
           
private  java.util.Set<java.util.Locale> supportedLocales
           
 
Constructor Summary
MockPortletConfig()
          Create a new MockPortletConfig with a default MockPortletContext.
MockPortletConfig(PortletContext portletContext)
          Create a new MockPortletConfig.
MockPortletConfig(PortletContext portletContext, java.lang.String portletName)
          Create a new MockPortletConfig.
MockPortletConfig(java.lang.String portletName)
          Create a new MockPortletConfig with a default MockPortletContext.
 
Method Summary
 void addContainerRuntimeOption(java.lang.String key, java.lang.String value)
           
 void addContainerRuntimeOption(java.lang.String key, java.lang.String[] values)
           
 void addInitParameter(java.lang.String name, java.lang.String value)
           
 void addProcessingEventQName(javax.xml.namespace.QName name)
           
 void addPublicRenderParameterName(java.lang.String name)
           
 void addPublishingEventQName(javax.xml.namespace.QName name)
           
 void addSupportedLocale(java.util.Locale locale)
           
 java.util.Map<java.lang.String,java.lang.String[]> getContainerRuntimeOptions()
           
 java.lang.String getDefaultNamespace()
           
 java.lang.String getInitParameter(java.lang.String name)
           
 java.util.Enumeration<java.lang.String> getInitParameterNames()
           
 PortletContext getPortletContext()
           
 java.lang.String getPortletName()
           
 java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames()
           
 java.util.Enumeration<java.lang.String> getPublicRenderParameterNames()
           
 java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames()
           
 java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
           
 java.util.Enumeration<java.util.Locale> getSupportedLocales()
           
 void setDefaultNamespace(java.lang.String defaultNamespace)
           
 void setResourceBundle(java.util.Locale locale, java.util.ResourceBundle resourceBundle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portletContext

private final PortletContext portletContext

portletName

private final java.lang.String portletName

resourceBundles

private final java.util.Map<java.util.Locale,java.util.ResourceBundle> resourceBundles

initParameters

private final java.util.Map<java.lang.String,java.lang.String> initParameters

publicRenderParameterNames

private final java.util.Set<java.lang.String> publicRenderParameterNames

defaultNamespace

private java.lang.String defaultNamespace

publishingEventQNames

private final java.util.Set<javax.xml.namespace.QName> publishingEventQNames

processingEventQNames

private final java.util.Set<javax.xml.namespace.QName> processingEventQNames

supportedLocales

private final java.util.Set<java.util.Locale> supportedLocales

containerRuntimeOptions

private final java.util.Map<java.lang.String,java.lang.String[]> containerRuntimeOptions
Constructor Detail

MockPortletConfig

public MockPortletConfig()
Create a new MockPortletConfig with a default MockPortletContext.


MockPortletConfig

public MockPortletConfig(java.lang.String portletName)
Create a new MockPortletConfig with a default MockPortletContext.

Parameters:
portletName - the name of the portlet

MockPortletConfig

public MockPortletConfig(PortletContext portletContext)
Create a new MockPortletConfig.

Parameters:
portletContext - the PortletContext that the portlet runs in

MockPortletConfig

public MockPortletConfig(PortletContext portletContext,
                         java.lang.String portletName)
Create a new MockPortletConfig.

Parameters:
portletContext - the PortletContext that the portlet runs in
portletName - the name of the portlet
Method Detail

getPortletName

public java.lang.String getPortletName()
Specified by:
getPortletName in interface PortletConfig

getPortletContext

public PortletContext getPortletContext()
Specified by:
getPortletContext in interface PortletConfig

setResourceBundle

public void setResourceBundle(java.util.Locale locale,
                              java.util.ResourceBundle resourceBundle)

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
Specified by:
getResourceBundle in interface PortletConfig

addInitParameter

public void addInitParameter(java.lang.String name,
                             java.lang.String value)

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Specified by:
getInitParameter in interface PortletConfig

getInitParameterNames

public java.util.Enumeration<java.lang.String> getInitParameterNames()
Specified by:
getInitParameterNames in interface PortletConfig

addPublicRenderParameterName

public void addPublicRenderParameterName(java.lang.String name)

getPublicRenderParameterNames

public java.util.Enumeration<java.lang.String> getPublicRenderParameterNames()
Specified by:
getPublicRenderParameterNames in interface PortletConfig

setDefaultNamespace

public void setDefaultNamespace(java.lang.String defaultNamespace)

getDefaultNamespace

public java.lang.String getDefaultNamespace()
Specified by:
getDefaultNamespace in interface PortletConfig

addPublishingEventQName

public void addPublishingEventQName(javax.xml.namespace.QName name)

getPublishingEventQNames

public java.util.Enumeration<javax.xml.namespace.QName> getPublishingEventQNames()
Specified by:
getPublishingEventQNames in interface PortletConfig

addProcessingEventQName

public void addProcessingEventQName(javax.xml.namespace.QName name)

getProcessingEventQNames

public java.util.Enumeration<javax.xml.namespace.QName> getProcessingEventQNames()
Specified by:
getProcessingEventQNames in interface PortletConfig

addSupportedLocale

public void addSupportedLocale(java.util.Locale locale)

getSupportedLocales

public java.util.Enumeration<java.util.Locale> getSupportedLocales()
Specified by:
getSupportedLocales in interface PortletConfig

addContainerRuntimeOption

public void addContainerRuntimeOption(java.lang.String key,
                                      java.lang.String value)

addContainerRuntimeOption

public void addContainerRuntimeOption(java.lang.String key,
                                      java.lang.String[] values)

getContainerRuntimeOptions

public java.util.Map<java.lang.String,java.lang.String[]> getContainerRuntimeOptions()
Specified by:
getContainerRuntimeOptions in interface PortletConfig