Class MockPortletConfig
- java.lang.Object
- org.springframework.mock.web.portlet.MockPortletConfig
- All Implemented Interfaces:
PortletConfig
public class MockPortletConfig extends Object implements PortletConfig
Mock implementation of thePortletConfig
interface.- Since:
- 2.0
- Author:
- John A. Lewis, Juergen Hoeller
Constructor Summary
Constructors Constructor Description MockPortletConfig()
Create a new MockPortletConfig with a defaultMockPortletContext
.MockPortletConfig(String portletName)
Create a new MockPortletConfig with a defaultMockPortletContext
.MockPortletConfig(PortletContext portletContext)
Create a new MockPortletConfig.MockPortletConfig(PortletContext portletContext, String portletName)
Create a new MockPortletConfig.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContainerRuntimeOption(String key, String value)
void
addContainerRuntimeOption(String key, String[] values)
void
addInitParameter(String name, String value)
void
addProcessingEventQName(QName name)
void
addPublicRenderParameterName(String name)
void
addPublishingEventQName(QName name)
void
addSupportedLocale(Locale locale)
Map<String,String[]>
getContainerRuntimeOptions()
String
getDefaultNamespace()
String
getInitParameter(String name)
Enumeration<String>
getInitParameterNames()
PortletContext
getPortletContext()
String
getPortletName()
Enumeration<QName>
getProcessingEventQNames()
Enumeration<String>
getPublicRenderParameterNames()
Enumeration<QName>
getPublishingEventQNames()
ResourceBundle
getResourceBundle(Locale locale)
Enumeration<Locale>
getSupportedLocales()
void
setDefaultNamespace(String defaultNamespace)
void
setResourceBundle(Locale locale, ResourceBundle resourceBundle)
Constructor Detail
MockPortletConfig
public MockPortletConfig()
Create a new MockPortletConfig with a defaultMockPortletContext
.
MockPortletConfig
public MockPortletConfig(String portletName)
Create a new MockPortletConfig with a defaultMockPortletContext
.- 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, String portletName)
Create a new MockPortletConfig.- Parameters:
portletContext
- the PortletContext that the portlet runs inportletName
- the name of the portlet
Method Detail
getPortletName
public String getPortletName()
- Specified by:
getPortletName
in interfacePortletConfig
getPortletContext
public PortletContext getPortletContext()
- Specified by:
getPortletContext
in interfacePortletConfig
setResourceBundle
public void setResourceBundle(Locale locale, ResourceBundle resourceBundle)
getResourceBundle
public ResourceBundle getResourceBundle(Locale locale)
- Specified by:
getResourceBundle
in interfacePortletConfig
addInitParameter
public void addInitParameter(String name, String value)
getInitParameter
public String getInitParameter(String name)
- Specified by:
getInitParameter
in interfacePortletConfig
getInitParameterNames
public Enumeration<String> getInitParameterNames()
- Specified by:
getInitParameterNames
in interfacePortletConfig
addPublicRenderParameterName
public void addPublicRenderParameterName(String name)
getPublicRenderParameterNames
public Enumeration<String> getPublicRenderParameterNames()
- Specified by:
getPublicRenderParameterNames
in interfacePortletConfig
setDefaultNamespace
public void setDefaultNamespace(String defaultNamespace)
getDefaultNamespace
public String getDefaultNamespace()
- Specified by:
getDefaultNamespace
in interfacePortletConfig
addPublishingEventQName
public void addPublishingEventQName(QName name)
getPublishingEventQNames
public Enumeration<QName> getPublishingEventQNames()
- Specified by:
getPublishingEventQNames
in interfacePortletConfig
addProcessingEventQName
public void addProcessingEventQName(QName name)
getProcessingEventQNames
public Enumeration<QName> getProcessingEventQNames()
- Specified by:
getProcessingEventQNames
in interfacePortletConfig
addSupportedLocale
public void addSupportedLocale(Locale locale)
getSupportedLocales
public Enumeration<Locale> getSupportedLocales()
- Specified by:
getSupportedLocales
in interfacePortletConfig
addContainerRuntimeOption
public void addContainerRuntimeOption(String key, String value)
addContainerRuntimeOption
public void addContainerRuntimeOption(String key, String[] values)
getContainerRuntimeOptions
public Map<String,String[]> getContainerRuntimeOptions()
- Specified by:
getContainerRuntimeOptions
in interfacePortletConfig