Class MockPortletPreferences
- java.lang.Object
- org.springframework.mock.web.portlet.MockPortletPreferences
- All Implemented Interfaces:
PortletPreferences
public class MockPortletPreferences extends Object implements PortletPreferences
Mock implementation of thePortletPreferences
interface.- Since:
- 2.0
- Author:
- John A. Lewis, Juergen Hoeller
Constructor Summary
Constructors Constructor Description MockPortletPreferences()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String[]>
getMap()
Enumeration<String>
getNames()
String
getValue(String key, String def)
String[]
getValues(String key, String[] def)
boolean
isReadOnly(String key)
void
reset(String key)
void
setPreferencesValidator(PreferencesValidator preferencesValidator)
void
setReadOnly(String key, boolean readOnly)
void
setValue(String key, String value)
void
setValues(String key, String[] values)
void
store()
Constructor Detail
MockPortletPreferences
public MockPortletPreferences()
Method Detail
setReadOnly
public void setReadOnly(String key, boolean readOnly)
isReadOnly
public boolean isReadOnly(String key)
- Specified by:
isReadOnly
in interfacePortletPreferences
getValue
public String getValue(String key, String def)
- Specified by:
getValue
in interfacePortletPreferences
getValues
public String[] getValues(String key, String[] def)
- Specified by:
getValues
in interfacePortletPreferences
setValue
public void setValue(String key, String value) throws ReadOnlyException
- Specified by:
setValue
in interfacePortletPreferences
- Throws:
ReadOnlyException
setValues
public void setValues(String key, String[] values) throws ReadOnlyException
- Specified by:
setValues
in interfacePortletPreferences
- Throws:
ReadOnlyException
getNames
public Enumeration<String> getNames()
- Specified by:
getNames
in interfacePortletPreferences
reset
public void reset(String key) throws ReadOnlyException
- Specified by:
reset
in interfacePortletPreferences
- Throws:
ReadOnlyException
setPreferencesValidator
public void setPreferencesValidator(PreferencesValidator preferencesValidator)
store
public void store() throws IOException, ValidatorException
- Specified by:
store
in interfacePortletPreferences
- Throws:
IOException
ValidatorException