org.xwiki.rendering.macro.dashboard
Class Gadget

java.lang.Object
  extended by org.xwiki.rendering.macro.dashboard.Gadget

public class Gadget
extends java.lang.Object

Abstraction for a gadget to put on a dashboard, to contain its title, content and position.

Since:
3.0M3
Version:
$Id$

Constructor Summary
Gadget(java.lang.String id, java.util.List<Block> title, java.util.List<Block> content, java.lang.String position)
          Creates a gadget from a title, content and position.
 
Method Summary
 java.util.List<Block> getContent()
           
 java.lang.String getId()
           
 java.lang.String getPosition()
           
 java.util.List<Block> getTitle()
           
 java.lang.String getTitleSource()
           
 void setContent(java.util.List<Block> content)
           
 void setId(java.lang.String id)
           
 void setPosition(java.lang.String position)
           
 void setTitle(java.util.List<Block> title)
           
 void setTitleSource(java.lang.String titleSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gadget

public Gadget(java.lang.String id,
              java.util.List<Block> title,
              java.util.List<Block> content,
              java.lang.String position)
Creates a gadget from a title, content and position.

Parameters:
id - the id of this gadget
title - the title of the gadget
content - the content of the gadget
position - the position of the gadget
Method Detail

getTitle

public java.util.List<Block> getTitle()
Returns:
the title

setTitle

public void setTitle(java.util.List<Block> title)
Parameters:
title - the title to set

getContent

public java.util.List<Block> getContent()
Returns:
the content

setContent

public void setContent(java.util.List<Block> content)
Parameters:
content - the content to set

getPosition

public java.lang.String getPosition()
Returns:
the position

setPosition

public void setPosition(java.lang.String position)
Parameters:
position - the position to set

getId

public java.lang.String getId()
Returns:
the id of this gadget, to render in the content

setId

public void setId(java.lang.String id)
Parameters:
id - the id to set to this gadget

getTitleSource

public java.lang.String getTitleSource()
Returns:
the titleSource FIXME: this should be passed in a different way, potentially in metadata block attached to the title block. FTM, to make it backwards compatible, keep it like this.

setTitleSource

public void setTitleSource(java.lang.String titleSource)
Parameters:
titleSource - the titleSource to set


Copyright © 2004-2011 XWiki. All Rights Reserved.