public class RequestPreferences extends Object implements IPreferences
ServiceContainerRequest
.TYPE_SERVICE_INTERFACE_INSTANCE
Constructor and Description |
---|
RequestPreferences(ServiceContainerRequest request,
IPreferences preferences) |
Modifier and Type | Method and Description |
---|---|
String |
getLocalValue(String key,
String def)
Returns the first String value associated with the specified key of this preference.
|
String[] |
getLocalValues(String key,
String[] def)
Returns the String array value associated with the specified key in this preference.
|
Map |
getMap() |
Enumeration |
getNames() |
String |
getValue(String key,
String def) |
String[] |
getValues(String key,
String[] def) |
boolean |
isReadOnly(String key) |
void |
reset(String key) |
void |
setValue(String key,
String value) |
void |
setValues(String key,
String[] values) |
void |
store() |
public RequestPreferences(ServiceContainerRequest request, IPreferences preferences)
public Map getMap()
getMap
in interface PortletPreferences
public Enumeration getNames()
getNames
in interface PortletPreferences
public String getValue(String key, String def)
getValue
in interface PortletPreferences
public String[] getValues(String key, String[] def)
getValues
in interface PortletPreferences
public boolean isReadOnly(String key)
isReadOnly
in interface PortletPreferences
public void reset(String key) throws ReadOnlyException
reset
in interface PortletPreferences
ReadOnlyException
public void setValue(String key, String value) throws ReadOnlyException
setValue
in interface PortletPreferences
ReadOnlyException
public void setValues(String key, String[] values) throws ReadOnlyException
setValues
in interface PortletPreferences
ReadOnlyException
public void store() throws IOException, ValidatorException
store
in interface PortletPreferences
IOException
ValidatorException
public String getLocalValue(String key, String def)
IPreferences
null
value is
treated as a non-existent value.getLocalValue
in interface IPreferences
key
- key for which the associated value is to be returneddef
- the value to be returned in the event that there is no value available associated with this
key
.key
, or def
if no value is associated with
key
, or the backing store is inaccessible. The value is read locally in the current preferences
level.PortletPreferences.getValues(String, String[])
public String[] getLocalValues(String key, String[] def)
IPreferences
Returns the specified default if there is no value associated with the key, or if the backing store is
inaccessible. A null
value is treated as a non-existent value.
If the implementation supports stored defaults and such a default exists and is accessible, it is used in favor of the specified default.
getLocalValues
in interface IPreferences
key
- key for which associated value is to be returned.def
- the value to be returned in the event that this preference node has no value associated with
key
or the associated value cannot be interpreted as a String array, or the backing store is
inaccessible.key
, or def
if the associated value does
not exist. The value is read locally in the current preferences level.PortletPreferences.getValue(String,String)
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.