Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.community.widget
Interface Widget

All Known Implementing Classes:
BaseWidget

public interface Widget

All Widgets must implement this interface, which exposes the render(WidgetContext, com.jivesoftware.community.widget.Widget.ContainerSize) method. A widget is responsible for rendering a portable chunk of code that can be installed and executed within any separate HTML-based web page by an end user without requiring additional compilation.

See Also:
WidgetFrame, WidgetManager

Nested Class Summary
static class Widget.ContainerSize
          Enumeration of the size of the parent container.
 
Method Summary
 java.lang.String getCssClass()
          Returns a custom css class for the widget, or null if a custom css class does not exist.
 java.lang.String getCustomTitle()
          Returns a custom title that will override the default title when the widget is rendered, or null if a custom title does not exist.
 java.lang.String getDescription(WidgetContext widgetContext)
          Returns the default description of the widget
 long getID()
          Gets the internal id of the widget
 java.lang.String getTitle(WidgetContext widgetContext)
          Returns the default title of the widget
 java.lang.String render(WidgetContext widgetContext, Widget.ContainerSize size)
          Renders the HTML content of the widget.
 void setCustomTitle(java.lang.String customTitle)
          Sets a custom title that will override the default title when the widget is rendered.
 void setID(long ID)
          Sets the internal id of the widget
 

Method Detail

getID

long getID()
Gets the internal id of the widget

Returns:
the internal id of the widget

setID

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

Parameters:
ID - the internal id of the widget

getTitle

java.lang.String getTitle(WidgetContext widgetContext)
Returns the default title of the widget

Parameters:
widgetContext - the widget context that will be used to get the title
Returns:
the default title of the widget

getCustomTitle

java.lang.String getCustomTitle()
Returns a custom title that will override the default title when the widget is rendered, or null if a custom title does not exist.

Returns:
a custom title that will override the default title when the widget is rendered, or null if a custom title does not exist.

setCustomTitle

void setCustomTitle(java.lang.String customTitle)
Sets a custom title that will override the default title when the widget is rendered.

Parameters:
customTitle - a custom title that will override the default title when the widget is rendered.

getDescription

java.lang.String getDescription(WidgetContext widgetContext)
Returns the default description of the widget

Parameters:
widgetContext - the widget context that will be used to get the description
Returns:
the description of the widget

getCssClass

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

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

render

java.lang.String render(WidgetContext widgetContext,
                        Widget.ContainerSize size)
Renders the HTML content of the widget.

Parameters:
widgetContext - the widget context that will be used to render this widget
size - the container size to render the widget
Returns:
the HTML content of the widget.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.