public class MockPortletPreferences
extends java.lang.Object
javax.portlet.PortletPreferences
interface.Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String[]> |
preferences |
private PreferencesValidator |
preferencesValidator |
private java.util.Set<java.lang.String> |
readOnly |
Constructor and Description |
---|
MockPortletPreferences() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String[]> |
getMap() |
java.util.Enumeration<java.lang.String> |
getNames() |
java.lang.String |
getValue(java.lang.String key,
java.lang.String def) |
java.lang.String[] |
getValues(java.lang.String key,
java.lang.String[] def) |
boolean |
isReadOnly(java.lang.String key) |
void |
reset(java.lang.String key) |
void |
setPreferencesValidator(PreferencesValidator preferencesValidator) |
void |
setReadOnly(java.lang.String key,
boolean readOnly) |
void |
setValue(java.lang.String key,
java.lang.String value) |
void |
setValues(java.lang.String key,
java.lang.String[] values) |
void |
store() |
private PreferencesValidator preferencesValidator
private final java.util.Map<java.lang.String,java.lang.String[]> preferences
private final java.util.Set<java.lang.String> readOnly
public void setReadOnly(java.lang.String key, boolean readOnly)
public boolean isReadOnly(java.lang.String key)
public java.lang.String getValue(java.lang.String key, java.lang.String def)
public java.lang.String[] getValues(java.lang.String key, java.lang.String[] def)
public void setValue(java.lang.String key, java.lang.String value) throws ReadOnlyException
ReadOnlyException
public void setValues(java.lang.String key, java.lang.String[] values) throws ReadOnlyException
ReadOnlyException
public java.util.Enumeration<java.lang.String> getNames()
public java.util.Map<java.lang.String,java.lang.String[]> getMap()
public void reset(java.lang.String key) throws ReadOnlyException
ReadOnlyException
public void setPreferencesValidator(PreferencesValidator preferencesValidator)
public void store() throws java.io.IOException, ValidatorException
java.io.IOException
ValidatorException