com.arsdigita.bebop
Interface Portlet

All Known Implementing Classes:
AbstractPortlet

public interface Portlet

An interface specifying Component-like behavior for a Portlet, insofar as XML generation is concerned. Since a Portlet gets its state only from PortalModel, it is stateless from the Bebop point of view and does not need Component's state management. We do still, however, want Portlet to produce XML just as other Components do.

The Portlet interface is used in Portal when it builds a new PortalModel and fetches a set of Portlets. Portal calls generateXML(com.arsdigita.bebop.PageState, com.arsdigita.xml.Element) on each Portlet returned.

Implementers of Portlets will ordinarily want to extend AbstractPortlet since it provides a default XML frame for portlets that the Portal stylesheet knows to transform.

Version:
$Id: //core-platform/dev/src/com/arsdigita/bebop/Portlet.java#10 $
Author:
Justin Ross, James Parsons
See Also:
Portal, PortalModel, PortalModelBuilder, AbstractPortlet

Field Summary
static String versionId
           
 
Method Summary
 void generateXML(PageState pageState, Element parentElement)
          Builds an XML fragment and attaches it to this component's parent.
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Method Detail

generateXML

public void generateXML(PageState pageState,
                        Element parentElement)
Builds an XML fragment and attaches it to this component's parent. Someone implementing a TimeOfDayPortlet could, for instance, override this method to fetch the time and wrap it in a Bebop Label. However, it is preferable to extend AbstractPortlet, since it provides a default "XML wrapper" for portlets.

Parameters:
pageState - the PageState of the current request
parentElement - the element to which to attach the XML this method creates


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC