Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.widget
Interface WidgetLayout


public interface WidgetLayout

All WidgetLayouts must implement this interface. A widget layout is nothing more than a wrapper around a Freemarker template which is responsible for rendering a group of anywhere from one to three columns of widgets. In other words, a widget layout is combined with a group of widget frames to render a customized / personalized page.

See Also:
Widget, WidgetFrame, WidgetManager

Method Summary
 String getCssClass()
          Returns a custom css class for the widget layout preview, or null if a custom css class does not exist.
 String getFreemarkerTemplate()
          Returns the path to the Freemarker template responsible for rendering this widget layout
 long getID()
          Gets the internal id of the widget layout
 int getNumColumns()
          Returns the number of columns that this widget layout supports.
 String getTitle()
          Returns the title of the widget layout
 List<WidgetFrame> migrateFrames(Map<Integer,List<WidgetFrame>> frames)
          Updates the widget frame configuration to match the (potentially) new number of columns.
 void setID(long ID)
          Sets the internal id of the widget layout
 

Method Detail

getID

long getID()
Gets the internal id of the widget layout

Returns:
the internal id of the widget layout

setID

void setID(long ID)
Sets the internal id of the widget layout

Parameters:
ID - the internal id of the widget layout

getTitle

String getTitle()
Returns the title of the widget layout

Returns:
the title of the widget layout

getCssClass

String getCssClass()
Returns a custom css class for the widget layout preview, or null if a custom css class does not exist.

Returns:
a custom css class for the widget layout preview, or null if a custom css class does not exist.

getNumColumns

int getNumColumns()
Returns the number of columns that this widget layout supports.

Returns:
the number of columns that this widget layout supports.

getFreemarkerTemplate

String getFreemarkerTemplate()
Returns the path to the Freemarker template responsible for rendering this widget layout

Returns:
the path to the Freemarker template responsible for rendering this widget layout

migrateFrames

List<WidgetFrame> migrateFrames(Map<Integer,List<WidgetFrame>> frames)
Updates the widget frame configuration to match the (potentially) new number of columns. By default, BaseWidgetLayout will take care of the migration but implementations are free to perform their own mapping of widget frames to

Parameters:
frames - the current widget frame configuration
Returns:
the updated list of widget frames

Clearspace Project Page

Copyright © 1999-2007 Jive Software.