Package lumis.portal.servicecontainer
Class RequestPreferences
- java.lang.Object
-
- lumis.portal.servicecontainer.RequestPreferences
-
- All Implemented Interfaces:
PortletPreferences
,IPreferences
public class RequestPreferences extends Object implements IPreferences
The preferences object returned by theServiceContainerRequest
.- Since:
- 4.0.7
- Version:
- $Revision: 20212 $ $Date: 2017-06-05 18:16:13 -0300 (Mon, 05 Jun 2017) $
-
-
Field Summary
-
Fields inherited from interface lumis.portal.preferences.IPreferences
TYPE_SERVICE_INTERFACE_INSTANCE
-
-
Constructor Summary
Constructors Constructor Description RequestPreferences(ServiceContainerRequest request, IPreferences preferences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Constructor Detail
-
RequestPreferences
public RequestPreferences(ServiceContainerRequest request, IPreferences preferences)
-
-
Method Detail
-
getMap
public Map getMap()
- Specified by:
getMap
in interfacePortletPreferences
-
getNames
public Enumeration getNames()
- Specified by:
getNames
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
-
isReadOnly
public boolean isReadOnly(String key)
- Specified by:
isReadOnly
in interfacePortletPreferences
-
reset
public void reset(String key) throws ReadOnlyException
- Specified by:
reset
in interfacePortletPreferences
- Throws:
ReadOnlyException
-
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
-
store
public void store() throws IOException, ValidatorException
- Specified by:
store
in interfacePortletPreferences
- Throws:
IOException
ValidatorException
-
getLocalValue
public String getLocalValue(String key, String def)
Description copied from interface:IPreferences
Returns the first String value associated with the specified key of this preference. This preference is read locally in the current preference level. If there is one or more preference values associated with the given key it returns the first local associated value. If there are no preference values associated with the given key, or the backing preference database is unavailable, it returns the given default value. Anull
value is treated as a non-existent value.- Specified by:
getLocalValue
in interfaceIPreferences
- Parameters:
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 thiskey
.- Returns:
- the local value associated with
key
, ordef
if no value is associated withkey
, or the backing store is inaccessible. The value is read locally in the current preferences level. - See Also:
PortletPreferences.getValues(String, String[])
-
getLocalValues
public String[] getLocalValues(String key, String[] def)
Description copied from interface:IPreferences
Returns the String array value associated with the specified key in this preference. This preference is read locally in the current preferences level.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.
- Specified by:
getLocalValues
in interfaceIPreferences
- Parameters:
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 withkey
or the associated value cannot be interpreted as a String array, or the backing store is inaccessible.- Returns:
- the String array value associated with
key
, ordef
if the associated value does not exist. The value is read locally in the current preferences level. - See Also:
PortletPreferences.getValue(String,String)
-
-