net.sf.jportlet.portlet
Interface PortletData

All Known Subinterfaces:
PortletSettings
All Known Implementing Classes:
PortletDataImpl, PortletSettingsImpl

public interface PortletData

The PortletData contains information about the concrete portlet instance for a given user. Also, it is through the data that the portlet has access to the personalized data.

Author:
Herve Tchepannou

Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Returns the value of an attribute or null if no such attribute exists
 java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
          Returns the value of an attribute
 java.util.Enumeration getAttributeNames()
          Returns the names of all the attribute
 void removeAttribute(java.lang.String name)
          Removes the attribute with the given name.
 void setAttribute(java.lang.String name, java.lang.String value)
          Sets the attribute with the given name and value
 void store()
          Store all the attributes
 

Method Detail

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Returns the value of an attribute or null if no such attribute exists

Parameters:
name - name of the attribute
Returns:
String

getAttribute

public java.lang.String getAttribute(java.lang.String name,
                                     java.lang.String defaultValue)
Returns the value of an attribute

Parameters:
name - name of the attribute
defaultValue - value to return the attribute doesn't exists
Returns:
String

getAttributeNames

public java.util.Enumeration getAttributeNames()
Returns the names of all the attribute

Returns:
Enumeration

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws AccessDeniedException
Removes the attribute with the given name. If no such attribute exists, this method does nothing

Parameters:
name - name of the attribute to remove
Throws:
AccessDeniedException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
Sets the attribute with the given name and value

Parameters:
name - name of the attribute
value - value

store

public void store()
           throws AccessDeniedException,
                  PortletException
Store all the attributes

Throws:
AccessDeniedException - if the caller isn't authorized to access this data object
PortletException - if any other error occurs


Copyright © 2002 Herve Tchepannou. All Rights Reserved.