|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.theme.webwidgets.providers.PersistentProvider
public class PersistentProvider
Constructor Summary | |
---|---|
PersistentProvider()
|
Method Summary | |
---|---|
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 |
deleteWidgetData(Widget widget)
Delete all data associated with a widget |
Principal |
getCurrentPrincipal()
|
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 |
removeWidgets()
|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistentProvider()
Method Detail |
---|
public void activate()
Provider
activate
in interface Provider
public Principal getCurrentPrincipal()
public void addWidget(Widget widget, String regionName, int order) throws ProviderException
Provider
addWidget
in interface Provider
widget
- the widget to addregionName
- the name of the regionorder
- the order at which to insert the widget (begins with 0)
ProviderException
public Widget createWidget(String widgetTypeName) throws ProviderException
Provider
createWidget
in interface Provider
widgetTypeName
- the widget type name
ProviderException
public String getRegionOfWidget(Widget widget) throws ProviderException
Provider
getRegionOfWidget
in interface Provider
widget
- the widget to get the region of
ProviderException
public WidgetState getWidgetState(Widget widget) throws ProviderException
Provider
getWidgetState
in interface Provider
widget
- the widget whose state is to be obtained
WidgetState
)
ProviderException
public Widget getWidgetByUid(String uid) throws ProviderException
Provider
getWidgetByUid
in interface Provider
uid
- the widget's unique identifier
ProviderException
public List<Widget> getWidgets(String regionName) throws ProviderException
Provider
getWidgets
in interface Provider
regionName
- the name of the region from which to get the list of
widgets
ProviderException
public void moveWidget(Widget widget, String destRegionName, int order) throws ProviderException
Provider
moveWidget
in interface Provider
widget
- the widget to movedestRegionName
- the name of the destination regionorder
- the order at which to insert the widget
ProviderException
public void removeWidget(Widget widget) throws ProviderException
Provider
removeWidget
in interface Provider
widget
- the widget to remove
ProviderException
public void removeWidgets() throws ProviderException
ProviderException
public void reorderWidget(Widget widget, int order) throws ProviderException
Provider
reorderWidget
in interface Provider
widget
- the widget to reorderorder
- the new order
ProviderException
public Map<String,String> getWidgetPreferences(Widget widget) throws ProviderException
Provider
getWidgetPreferences
in interface Provider
widget
- the widget whose preferences are to be obtained
ProviderException
public void setWidgetPreferences(Widget widget, Map<String,String> preferences) throws ProviderException
Provider
setWidgetPreferences
in interface Provider
widget
- the widget whose preferences will be setpreferences
- a mapping of preferences as ProviderException
public void setWidgetState(Widget widget, WidgetState state) throws ProviderException
Provider
setWidgetState
in interface Provider
widget
- the widget whose state is to be setstate
- the state to set (see $WidgetState
)
ProviderException
public WidgetData getWidgetData(Widget widget, String dataName) throws ProviderException
Provider
getWidgetData
in interface Provider
widget
- the widget from which to get the datadataName
- the name of the data
ProviderException
public void setWidgetData(Widget widget, String dataName, WidgetData data) throws ProviderException
Provider
setWidgetData
in interface Provider
widget
- the widget to set data todataName
- the name of the datadata
- the widget data
ProviderException
public void deleteWidgetData(Widget widget) throws ProviderException
Provider
deleteWidgetData
in interface Provider
widget
- the widget
ProviderException
public boolean canRead()
Provider
canRead
in interface Provider
public boolean canWrite()
Provider
canWrite
in interface Provider
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |