org.apache.jetspeed.portal
Interface PortletInstance

All Known Implementing Classes:
JetspeedPortletInstance

public interface PortletInstance

This interface provides an easy, object-oriented approach to modifing a portlet instance's persistent attributes. It provides methods for getting, setting and removing attributes from portlet instance persistence storage. In a Jetspeed 1.4x PSML profile, the default XML format for an instance and attribute is:

Version:
$Id: PortletInstance.java,v 1.3 2004/02/23 04:05:35 jford Exp $
Author:
Scott Weaver, David Sean Taylor

Method Summary
 java.lang.String getAttribute(java.lang.String name)
          Retrieves an attributes value associated with a named object from a portlet instance's persistence storage.
 java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
          Retrieves an attributes value associated with a named object from a portlet instance's persistence storage.
 java.util.Iterator getAttributeNames()
          Retrieves a list of all attributes names for all the attributes contained within this portlet instance.
 java.util.Iterator getAttributes()
          Retrieves a list of all of the attributes of this portlet instance as org.apache.jetspeed.om.profile.Parameter objects.
 java.lang.String getDescription()
          Retrieves the description (if it is defined) of the parent portlet as it is defined within the portlet registry.
 PSMLDocument getDocument()
          Returns the PSMLDocument that contains this portlet instance.
 Entry getEntry()
          Returns the PSML OM instance associated with this instance.
 java.lang.String getName()
          Retrieves the name of the parent portlet as it is defined within the portlet registry.
 Portlet getPortlet()
          Returns the parent portlet of this PortletInstance.
 Profile getProfile()
          Returns the Profile instance containing this portlet instance.
 java.lang.String getTitle()
          Retrieves the title (if it is defined) of the parent portlet as it is defined within the portlet registry.
 void removeAllAttributes()
          Removes all portlet instance attributes from persistence storage.
 void removeAttribute(java.lang.String name)
          Removes a portlet instance attribute from persistence storage.
 void setAttribute(java.lang.String name, java.lang.String value)
          Sets a portlet instance attribute into persistence storage.
 

Method Detail

getAttribute

public java.lang.String getAttribute(java.lang.String name,
                                     java.lang.String defaultValue)
Retrieves an attributes value associated with a named object from a portlet instance's persistence storage.

Parameters:
name - The name of the attribute
defaultValue - The default value if the attribute is not found.
Returns:
String The attribute value, or the defaultValue if not found.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Retrieves an attributes value associated with a named object from a portlet instance's persistence storage.

Parameters:
name - The name of the attribute
Returns:
String The attribute value, or the empty string if not found.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
Sets a portlet instance attribute into persistence storage.

Parameters:
name - The name of the attribute.
value - The value of the attribute.

removeAttribute

public void removeAttribute(java.lang.String name)
Removes a portlet instance attribute from persistence storage.

Parameters:
name - The name of the attribute.

removeAllAttributes

public void removeAllAttributes()
Removes all portlet instance attributes from persistence storage.


getAttributes

public java.util.Iterator getAttributes()
Retrieves a list of all of the attributes of this portlet instance as org.apache.jetspeed.om.profile.Parameter objects.

Returns:
java.util.Iterator

getAttributeNames

public java.util.Iterator getAttributeNames()
Retrieves a list of all attributes names for all the attributes contained within this portlet instance.

Returns:
java.util.Iterator

getDocument

public PSMLDocument getDocument()
Returns the PSMLDocument that contains this portlet instance.

Returns:
org.apache.jetspeed.om.profile.PSMLDocument

getProfile

public Profile getProfile()
Returns the Profile instance containing this portlet instance.

Returns:
org.apache.jetspeed.om.profile.Profile

getEntry

public Entry getEntry()
Returns the PSML OM instance associated with this instance.

Returns:
org.apache.jetspeed.om.profile.Entry

getPortlet

public Portlet getPortlet()
Returns the parent portlet of this PortletInstance.

Returns:
org.apache.jetspeed.portal.Portlet

getName

public java.lang.String getName()
Retrieves the name of the parent portlet as it is defined within the portlet registry.

Returns:
String The name of the portlet.

getTitle

public java.lang.String getTitle()
Retrieves the title (if it is defined) of the parent portlet as it is defined within the portlet registry.

Returns:
String The title of the portlet.

getDescription

public java.lang.String getDescription()
Retrieves the description (if it is defined) of the parent portlet as it is defined within the portlet registry.

Returns:
String The description of the portlet.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.