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 thePortletPreferencesinterface.- 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()StringgetValue(String key, String def)String[]getValues(String key, String[] def)booleanisReadOnly(String key)voidreset(String key)voidsetPreferencesValidator(PreferencesValidator preferencesValidator)voidsetReadOnly(String key, boolean readOnly)voidsetValue(String key, String value)voidsetValues(String key, String[] values)voidstore()
Constructor Detail
MockPortletPreferences
public MockPortletPreferences()
Method Detail
setReadOnly
public void setReadOnly(String key, boolean readOnly)
isReadOnly
public boolean isReadOnly(String key)
- Specified by:
isReadOnlyin interfacePortletPreferences
getValue
public String getValue(String key, String def)
- Specified by:
getValuein interfacePortletPreferences
getValues
public String[] getValues(String key, String[] def)
- Specified by:
getValuesin interfacePortletPreferences
setValue
public void setValue(String key, String value) throws ReadOnlyException
- Specified by:
setValuein interfacePortletPreferences- Throws:
ReadOnlyException
setValues
public void setValues(String key, String[] values) throws ReadOnlyException
- Specified by:
setValuesin interfacePortletPreferences- Throws:
ReadOnlyException
getNames
public Enumeration<String> getNames()
- Specified by:
getNamesin interfacePortletPreferences
reset
public void reset(String key) throws ReadOnlyException
- Specified by:
resetin interfacePortletPreferences- Throws:
ReadOnlyException
setPreferencesValidator
public void setPreferencesValidator(PreferencesValidator preferencesValidator)
store
public void store() throws IOException, ValidatorException
- Specified by:
storein interfacePortletPreferences- Throws:
IOExceptionValidatorException