org.apache.jetspeed.portal.controllers
Class AbstractPortletController

java.lang.Object
  extended byorg.apache.jetspeed.portal.controllers.AbstractPortletController
All Implemented Interfaces:
PortletController, java.io.Serializable
Direct Known Subclasses:
GridPortletController, VelocityPortletController

public abstract class AbstractPortletController
extends java.lang.Object
implements PortletController

Version:
$Id: AbstractPortletController.java,v 1.26 2004/02/23 03:25:06 jford Exp $
Author:
Kevin A. Burton
See Also:
Serialized Form

Field Summary
 int DEFAULT_PADDING
          Default padding to be displayed between portlets
 
Constructor Summary
AbstractPortletController()
           
 
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 map source.
protected  org.apache.ecs.ConcreteElement getContent(PortletSet set, org.apache.turbine.util.RunData data)
           
 org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
          Renders the content of the PortletSet for the current request
protected  org.apache.ecs.ConcreteElement getHTMLContent(PortletSet set, org.apache.turbine.util.RunData data)
           
 int getPadding()
          Returns the padding value between the displayed portlets
 PortletSet getPortlets()
          Returns the PortletSet to render by this controller
 java.lang.String getWidth()
           
protected  org.apache.ecs.ConcreteElement getWMLContent(PortletSet set, org.apache.turbine.util.RunData data)
           
 void init()
          Initialize this PortletController.
 void setConfig(PortletControllerConfig conf)
          Allows the user to override the default set of portlets...
 void setPadding(int padding)
          Sets the padding space to be put between portlets
 void setPadding(java.lang.String padding)
          Sets the padding space to be put between portlets
 void setPortlets(PortletSet portlets)
          Allows the user to override the default set of portlets...
 void setWidth(java.lang.String width)
           
 boolean supportsType(MimeType mimeType)
          Tests whether the controller supports outputting content for a specific mime type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PADDING

public int DEFAULT_PADDING
Default padding to be displayed between portlets

Constructor Detail

AbstractPortletController

public AbstractPortletController()
Method Detail

setConfig

public final void setConfig(PortletControllerConfig conf)
Allows the user to override the default set of portlets...

Specified by:
setConfig in interface PortletController
Parameters:
conf - the controller configuration

getConfig

public final PortletControllerConfig getConfig()
Description copied from interface: PortletController
Returns the configuration object for this object

Specified by:
getConfig in interface PortletController
Returns:
a configuration object

setPortlets

public final void setPortlets(PortletSet portlets)
Allows the user to override the default set of portlets...

Specified by:
setPortlets in interface PortletController
Parameters:
portlets - the portlet set to render

getPortlets

public final PortletSet getPortlets()
Description copied from interface: PortletController
Returns the PortletSet to render by this controller

Specified by:
getPortlets in interface PortletController
Returns:
the portlet set that should currently be rendered by this controller

getWidth

public java.lang.String getWidth()

setWidth

public void setWidth(java.lang.String width)

getPadding

public int getPadding()
Returns the padding value between the displayed portlets


setPadding

public void setPadding(int padding)
Sets the padding space to be put between portlets


setPadding

public void setPadding(java.lang.String padding)
Sets the padding space to be put between portlets


init

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

Specified by:
init in interface PortletController

supportsType

public boolean supportsType(MimeType mimeType)
Description copied from interface: PortletController
Tests whether the controller supports outputting content for a specific mime type

Specified by:
supportsType in interface PortletController
Parameters:
mimeType - the requested mime type
Returns:
true if the requested mime type is supported by this controller
See Also:
Portlet#supportsType

getContent

public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
Description copied from interface: PortletController
Renders the content of the PortletSet for the current request

Specified by:
getContent in interface PortletController
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

getContent

protected org.apache.ecs.ConcreteElement getContent(PortletSet set,
                                                    org.apache.turbine.util.RunData data)

getWMLContent

protected org.apache.ecs.ConcreteElement getWMLContent(PortletSet set,
                                                       org.apache.turbine.util.RunData data)

getHTMLContent

protected org.apache.ecs.ConcreteElement getHTMLContent(PortletSet set,
                                                        org.apache.turbine.util.RunData data)

getConstraints

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

Specified by:
getConstraints in interface PortletController
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.