|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletPreferences<E extends java.util.Map.Entry<java.lang.String,java.lang.String>>
An interface describing portlet preferences. Portlet preferences are not
the same as metadata in general,
but they may alternatively be accessed using the same interface, therefore
this interface extends MetaData
.
In contrast to MetaData, preferences can associate multiple values with
a single key; for multi-valued preferences the inherited getValue(java.lang.String)
method returns only the first value. Portlet preference values are always
strings.
Method Summary | |
---|---|
java.lang.String |
getStringValue(java.lang.String aName)
Returns the first preference value for the given preference key. |
java.lang.String[] |
getStringValues(java.lang.String aName)
Returns all preference values for the given preference key. |
java.lang.String |
getValue(java.lang.String aName)
Returns the same value as getStringValue(java.lang.String) |
boolean |
isPreferenceDefined(java.lang.String aName)
Returns true if the preference with the given name is
defined at this level in this set of preferences. |
boolean |
isReadOnly(java.lang.String aName)
Return true if the preference is set and marked as read-only in the portlet deployment descriptor. |
java.util.Iterator<E> |
iterator()
Returns an iterator holding the key/value pairs as Map.Entry
elements. |
Methods inherited from interface com.ibm.portal.MetaData |
---|
getNames |
Method Detail |
---|
java.lang.String getValue(java.lang.String aName)
getStringValue(java.lang.String)
getValue
in interface MetaData<java.lang.String,E extends java.util.Map.Entry<java.lang.String,java.lang.String>>
aName
- the parameter name
null
if none existsMetaData.getValue(String)
java.lang.String getStringValue(java.lang.String aName)
aName
- the preference key
null
, if the preference
is not setjava.lang.String[] getStringValues(java.lang.String aName)
aName
- the preference key
String
representing the preference values
or null
, if the preference is not setboolean isReadOnly(java.lang.String aName)
Read-only preferences can only be modified at the portlet definition layer, therefore the preferences layer of a portlet entity never contains read-only preferences.
aName
- the preference key
java.util.Iterator<E> iterator() throws ModelException
Map.Entry
elements.
To preserve compatibility with the MetaData semantics, the value of a returned entry
is the same as the object returned by a getValue(java.lang.String)
call. Therefore this
method only retrieves the first value for multi-valued preferences.
iterator
in interface ListModel<E extends java.util.Map.Entry<java.lang.String,java.lang.String>>
iterator
in interface MetaData<java.lang.String,E extends java.util.Map.Entry<java.lang.String,java.lang.String>>
null
ModelException
- if creation of iterator failsMetaData.iterator()
boolean isPreferenceDefined(java.lang.String aName)
true
if the preference with the given name is
defined at this level in this set of preferences. This is equivalent to,
but typically more efficient than iterating over the iterator()
method and checking for a preference with the given name.
aName
- the preference key
true
if the preference is defined,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |