Class Gadget
java.lang.Object
org.xwiki.rendering.macro.dashboard.Gadget
Abstraction for a gadget to put on a dashboard, to contain its title, content and position.
- Since:
- 3.0M3
- Version:
- $Id: 914af736ee7d14cb54a4583a0b7a788b356ad204 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.xwiki.rendering.block.Block>getId()List<org.xwiki.rendering.block.Block>getTitle()voidsetContent(List<org.xwiki.rendering.block.Block> content) voidvoidsetPosition(String position) voidvoidsetTitleSource(String titleSource)
-
Constructor Details
-
Gadget
public Gadget(String id, List<org.xwiki.rendering.block.Block> title, List<org.xwiki.rendering.block.Block> content, String position) Creates a gadget from a title, content and position.- Parameters:
id- the id of this gadgettitle- the title of the gadgetcontent- the content of the gadgetposition- the position of the gadget
-
-
Method Details
-
getTitle
- Returns:
- the title
-
setTitle
- Parameters:
title- the title to set
-
getContent
- Returns:
- the content
-
setContent
- Parameters:
content- the content to set
-
getPosition
- Returns:
- the position
-
setPosition
- Parameters:
position- the position to set
-
getId
- Returns:
- the id of this gadget, to render in the content
-
setId
- Parameters:
id- the id to set to this gadget
-
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
- Parameters:
titleSource- the titleSource to set
-