public class WidgetController extends Object
| Constructor and Description |
|---|
WidgetController() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createWidget(String buffer)
Create a widget
|
javax.ws.rs.core.Response |
deleteWidget(String title)
Delete a widget
|
void |
init() |
String |
listWidget(int limit,
int offset)
List widgets
|
String |
searchWidget(String query)
Search for widget base on widget title
|
javax.ws.rs.core.Response |
updateWidget(String title,
String buffer)
Update a widget
|
String |
viewWidget(String title)
View widget details
|
@PostConstruct @Singleton public void init()
public String listWidget(int limit, int offset)
limit - is number of widgets to returnoffset - is position in the widget listExamples.WIDGET_LISTpublic String searchWidget(String query)
query - is search critieriaExamples.WIDGET_LISTpublic String viewWidget(String title)
title - is title of the widgetExamples.SYSTEM_LOAD_AVERAGE_WIDGETpublic javax.ws.rs.core.Response createWidget(String buffer)
buffer - is widget configurationExamples.WELCOME_PAGE_WIDGETpublic javax.ws.rs.core.Response updateWidget(String title, String buffer)
title - is widget titlebuffer - is widget object in JSONExamples.WELCOME_PAGE_WIDGETpublic javax.ws.rs.core.Response deleteWidget(String title)
title - is widget titleCopyright © 2016 Apache Software Foundation. All Rights Reserved.