public class BackofficeWidgetPersistenceService
extends XmlModuleAwarePersistenceService
XmlModuleAwarePersistenceService. The implementation uses MediaModel to
persist the xml content.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BACKOFFICE_URL
Backoffice URL as root module does not have an url - it's items have null url.
|
static java.lang.String |
ERROR_PROCESSING_WIDGETS_CONFIG |
protected static java.lang.String |
TEXT_XML_MIME_TYPE |
protected static java.lang.String |
WIDGET_CONFIG_MEDIA |
| Constructor and Description |
|---|
BackofficeWidgetPersistenceService() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteWidgetTree(Widget widget) |
protected void |
deleteWidgetTreeInternal(Widget widget) |
protected java.util.List<WidgetExtension> |
extractWidgetExtensions(Widgets root) |
protected BackofficeConfigurationMediaHelper |
getBackofficeConfigurationMediaHelper() |
protected java.io.InputStream |
getDefaultWidgetsConfigInputStream() |
MediaService |
getMediaService() |
protected MediaModel |
getOrCreateWidgetsConfigMedia() |
protected boolean |
isLocalWidgetsFileExisting() |
protected boolean |
isWidgetsConfigStoredInMedia() |
Widget |
loadWidgetTree(java.lang.String widgetId) |
protected void |
putDefaultWidgetsConfig(MediaModel mediaModel) |
void |
resetToDefaults() |
void |
setBackofficeConfigurationMediaHelper(DefaultBackofficeConfigurationMediaHelper backofficeConfigurationMediaHelper) |
void |
setMediaService(MediaService mediaService) |
protected <T> java.util.List<T> |
sortByCockpitModulesLoadOrder(java.util.List<T> items,
java.util.function.Function<T,java.lang.String> moduleUrlExtractor)
Sorts given items by loading order of cockpit modules - using moduleUrlExtractor to item's module url.
|
protected void |
sortWidgetConnections(Widgets root) |
void |
storeWidgetTree(Widget widget) |
protected void |
storeWidgetTreeInternal(Widget widget) |
public static final java.lang.String ERROR_PROCESSING_WIDGETS_CONFIG
protected static final java.lang.String WIDGET_CONFIG_MEDIA
protected static final java.lang.String TEXT_XML_MIME_TYPE
protected static final java.lang.String BACKOFFICE_URL
public Widget loadWidgetTree(java.lang.String widgetId)
public void storeWidgetTree(Widget widget)
protected void storeWidgetTreeInternal(Widget widget)
public void deleteWidgetTree(Widget widget)
protected void deleteWidgetTreeInternal(Widget widget)
public void resetToDefaults()
protected boolean isLocalWidgetsFileExisting()
protected boolean isWidgetsConfigStoredInMedia()
protected MediaModel getOrCreateWidgetsConfigMedia()
protected void putDefaultWidgetsConfig(MediaModel mediaModel)
protected java.util.List<WidgetExtension> extractWidgetExtensions(Widgets root)
root - Widgets component holding all the items to be appliedWidgetExtension objects sorted in order of dependencies defined in extensioninfo.xmlprotected void sortWidgetConnections(Widgets root)
root - Widgets component holding all the connectionsprotected <T> java.util.List<T> sortByCockpitModulesLoadOrder(java.util.List<T> items,
java.util.function.Function<T,java.lang.String> moduleUrlExtractor)
T - type of items.items - items to be sortedmoduleUrlExtractor - extracts url of module from which item comes. If item is from backoffice (the root) it will be null.protected java.io.InputStream getDefaultWidgetsConfigInputStream()
public MediaService getMediaService()
public void setMediaService(MediaService mediaService)
protected BackofficeConfigurationMediaHelper getBackofficeConfigurationMediaHelper()
public void setBackofficeConfigurationMediaHelper(DefaultBackofficeConfigurationMediaHelper backofficeConfigurationMediaHelper)
Copyright © 2018 SAP SE. All Rights Reserved.