Class WidgetServiceImpl
java.lang.Object
ch.tocco.nice2.optional.cms.impl.content.widget.WidgetServiceImpl
- All Implemented Interfaces:
WidgetService
-
Constructor Summary
ConstructorDescriptionWidgetServiceImpl
(WidgetModelService widgetModelService, Context context, QueryBuilderFactory queryBuilderFactory) -
Method Summary
Modifier and TypeMethodDescriptionresolveRootWidgetConfigEntityList
(Entity widgetConfigEntity) Resolve the root widget for widget config entitysetUniqueWidgetKeys
(String html, @Nullable PrimaryKey sectionKey) Set unique attribute "key" on<widget>
tags.
-
Constructor Details
-
WidgetServiceImpl
public WidgetServiceImpl(WidgetModelService widgetModelService, Context context, QueryBuilderFactory queryBuilderFactory)
-
-
Method Details
-
resolveRootWidgetConfigEntityList
public EntityList resolveRootWidgetConfigEntityList(Entity widgetConfigEntity) throws PersistException Description copied from interface:WidgetService
Resolve the root widget for widget config entity- Specified by:
resolveRootWidgetConfigEntityList
in interfaceWidgetService
- Parameters:
widgetConfigEntity
- a widget config entity- Returns:
- the provided widget config entity's root config entity
- Throws:
PersistException
-
setUniqueWidgetKeys
public String setUniqueWidgetKeys(String html, @Nullable @Nullable PrimaryKey sectionKey) throws PersistException Description copied from interface:WidgetService
Set unique attribute "key" on<widget>
tags.- Specified by:
setUniqueWidgetKeys
in interfaceWidgetService
- Parameters:
html
- Any html string (containing some widgets)- Returns:
- the same html string, but every widget tag has a unique key attribute (system-wide)
- Throws:
PersistException
-