|
Portlet API 2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DynamicData is a collection of attributes (name-value pairs) that the portlet can use to tempoarily or persistently store information. Dynamic data can be found in various objects: the request, the session, the configuration, the user.
Actually, we want to put this up for discussion. Copying the Servlet API, the request and the session already have attribute manipulation. However, to introduce named section of attributes for configuration and personalized data, the dynamic data object was created which turned to be quite a good fit for request and session. It adds a uniform interface to attribute manipulation, plus it provides functionality for multi-value attributes an en-bloc copying.
The question is whether the similarity to the Servlet API or consistent APIs within the Portlet API has higher priority.
Method Summary | |
void |
addAllFrom(DynamicData aData)
Adds all attributes from the given data to this data. |
Object |
getAttribute(String name)
Returns the value of the attribute with the given name, or null if no such attribute exists. |
Enumeration |
getAttributeNames()
Returns an enumeration of all available attributes names. |
void |
removeAll()
Removes all attributes. |
void |
removeAttribute(String name)
Removes the attribute with the given name. |
void |
setAttribute(String name,
Object value)
Sets the attribute with the given name and value. |
Method Detail |
public void setAttribute(String name, Object value) throws AccessDeniedException
name
- the attribute namevalue
- the attribute valueAccessDeniedException
- if the caller isn't authorized to access
this data objectpublic Object getAttribute(String name) throws AccessDeniedException
null
if no such attribute exists.name
- the attribute nameAccessDeniedException
- if the caller isn't authorized to access
this data objectpublic Enumeration getAttributeNames() throws AccessDeniedException
AccessDeniedException
- if the caller isn't authorized to access
this data objectgetAttribute(String)
public void removeAttribute(String name) throws AccessDeniedException
name
- the attribute nameAccessDeniedException
- if the caller isn't authorized to access
this data objectpublic void removeAll() throws AccessDeniedException
AccessDeniedException
- if the caller isn't authorized to access
this data objectpublic void addAllFrom(DynamicData aData) throws AccessDeniedException
aData
- the data which is to be copied into this dataAccessDeniedException
- if the caller isn't authorized to access
either of the data objects
|
Portlet API 2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |