public interface Provider
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate a provider.
|
void |
addWidget(Widget widget,
String regionName,
int order)
Add a widget to a region.
|
boolean |
canRead()
Check for read access.
|
boolean |
canWrite()
Check write access.
|
Widget |
createWidget(String widgetTypeName)
Create a new widget.
|
void |
deactivate()
Deactivate a provider.
|
void |
deleteWidgetData(Widget widget)
Delete all data associated with a widget
|
void |
destroy()
Destroy a provider.
|
String |
getRegionOfWidget(Widget widget)
Get the region of a widget.
|
Widget |
getWidgetByUid(String uid)
Get a widget by its id.
|
WidgetData |
getWidgetData(Widget widget,
String dataName)
Get the data of a widget
|
Map<String,String> |
getWidgetPreferences(Widget widget)
Get the preferences of a widget.
|
List<Widget> |
getWidgets(String regionName)
Get the list of widgets in a region.
|
WidgetState |
getWidgetState(Widget widget)
Get the state of a widget.
|
void |
moveWidget(Widget widget,
String destRegionName,
int order)
Move a widget to another region.
|
void |
removeWidget(Widget widget)
Remove a widget.
|
void |
reorderWidget(Widget widget,
int order)
Reorder a widget.
|
void |
setWidgetData(Widget widget,
String dataName,
WidgetData data)
Set data to a widget
|
void |
setWidgetPreferences(Widget widget,
Map<String,String> preferences)
Set the preferences of a widget.
|
void |
setWidgetState(Widget widget,
WidgetState state)
Set the state of a widget.
|
void activate()
void deactivate()
void destroy() throws ProviderException
ProviderException
Widget createWidget(String widgetTypeName) throws ProviderException
widgetTypeName
- the widget type nameProviderException
Widget getWidgetByUid(String uid) throws ProviderException
uid
- the widget's unique identifierProviderException
List<Widget> getWidgets(String regionName) throws ProviderException
regionName
- the name of the region from which to get the list of
widgetsProviderException
void addWidget(Widget widget, String regionName, int order) throws ProviderException
widget
- the widget to addregionName
- the name of the regionorder
- the order at which to insert the widget (begins with 0)ProviderException
void moveWidget(Widget widget, String destRegionName, int order) throws ProviderException
widget
- the widget to movedestRegionName
- the name of the destination regionorder
- the order at which to insert the widgetProviderException
void reorderWidget(Widget widget, int order) throws ProviderException
widget
- the widget to reorderorder
- the new orderProviderException
void removeWidget(Widget widget) throws ProviderException
widget
- the widget to removeProviderException
String getRegionOfWidget(Widget widget) throws ProviderException
widget
- the widget to get the region ofProviderException
Map<String,String> getWidgetPreferences(Widget widget) throws ProviderException
widget
- the widget whose preferences are to be obtainedProviderException
void setWidgetPreferences(Widget widget, Map<String,String> preferences) throws ProviderException
widget
- the widget whose preferences will be setpreferences
- a mapping of preferences as ProviderException
void setWidgetState(Widget widget, WidgetState state) throws ProviderException
widget
- the widget whose state is to be setstate
- the state to set (see $WidgetState
)ProviderException
WidgetState getWidgetState(Widget widget) throws ProviderException
widget
- the widget whose state is to be obtainedWidgetState
)ProviderException
WidgetData getWidgetData(Widget widget, String dataName) throws ProviderException
widget
- the widget from which to get the datadataName
- the name of the dataProviderException
void setWidgetData(Widget widget, String dataName, WidgetData data) throws ProviderException
widget
- the widget to set data todataName
- the name of the datadata
- the widget dataProviderException
void deleteWidgetData(Widget widget) throws ProviderException
widget
- the widgetProviderException
boolean canRead()
boolean canWrite()
Copyright © 2011 Nuxeo SA. All Rights Reserved.