org.apache.jetspeed.portal
Interface PortletController

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
PanedPortletController
All Known Implementing Classes:
AbstractPortletController, VelocityPanedPortletController

public interface PortletController
extends java.io.Serializable

A PortletController is responsible for laying out and rendering the content of a PortletSet.

As such, it also provides 2 additionnal services :

Version:
$Id: PortletController.java,v 1.55 2005/03/21 18:21:41 sgala Exp $
Author:
RaphaŽl Luta, Kevin A. Burton

Method Summary
 PortletControllerConfig getConfig()
          Returns the configuration object for this object
 PortletSet.Constraints getConstraints(java.util.Map original)
          Creates a constraint object based on an original source.
 org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
          Renders the content of the PortletSet for the current request
 PortletSet getPortlets()
          Returns the PortletSet to render by this controller
 void init()
          Initialize this PortletController.
 void setConfig(PortletControllerConfig conf)
          Sets the configuration object for this controller instance
 void setPortlets(PortletSet portlets)
          Sets the PotletSet to render by this controller
 boolean supportsType(MimeType mimeType)
          Tests whether the controller supports outputting content for a specific mime type
 

Method Detail

init

public void init()
Initialize this PortletController. This method must be called after the Config object has been set and whenever it is changed


setConfig

public void setConfig(PortletControllerConfig conf)
Sets the configuration object for this controller instance

Parameters:
conf - the controller configuration

getConfig

public PortletControllerConfig getConfig()
Returns the configuration object for this object

Returns:
a configuration object

setPortlets

public void setPortlets(PortletSet portlets)
Sets the PotletSet to render by this controller

Parameters:
portlets - the portlet set to render

getPortlets

public PortletSet getPortlets()
Returns the PortletSet to render by this controller

Returns:
the portlet set that should currently be rendered by this controller

getContent

public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
Renders the content of the PortletSet for the current request

Parameters:
rundata - the RunData for the request
Returns:
the rendered content for this set or null if the content was written directly on the writer available in RunData

supportsType

public boolean supportsType(MimeType mimeType)
Tests whether the controller supports outputting content for a specific mime type

Parameters:
mimeType - the requested mime type
Returns:
true if the requested mime type is supported by this controller

getConstraints

public PortletSet.Constraints getConstraints(java.util.Map original)
Creates a constraint object based on an original source.

Parameters:
original - the source for this constraint object
Returns:
a new Constraints object appropriate for this controller


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