@Service(value="blWidgetService") public class WidgetServiceImpl extends Object implements WidgetService
| Modifier and Type | Field and Description |
|---|---|
protected com.broadleafcommerce.theme.service.ThemeService |
themeService |
protected WidgetDao |
widgetDao |
| Constructor and Description |
|---|
WidgetServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<Widget> |
findAllActiveWidgets() |
List<Widget> |
findAllCurrentlyUsedWidgets()
Returns a list of widgets such that each widget in the list is used by at least
one
ContentItem. |
List<ContentItem> |
findContentItemsByWidgetId(Long id)
Finds all Content Items which use the Widget by its internal database id
|
Widget |
findWidgetById(Long id)
Finds a Widget instance by its internal database id
|
String |
getWidgetClasspathPath(String pathPrefix,
Widget widget)
Returns a computed classpath for the given widget
|
String |
replaceCssThemeFields(String resourceData)
This is used to ensure that widget css is theme compatible by replacing the css theme fields.
|
Widget |
saveWidget(Widget widget)
Persists the given widget to the database.
|
protected com.broadleafcommerce.theme.service.ThemeService themeService
protected WidgetDao widgetDao
public Widget findWidgetById(Long id)
WidgetServicefindWidgetById in interface WidgetServiceWidgetpublic List<Widget> findAllActiveWidgets()
findAllActiveWidgets in interface WidgetServicepublic List<Widget> findAllCurrentlyUsedWidgets()
WidgetServiceContentItem.findAllCurrentlyUsedWidgets in interface WidgetServicepublic List<ContentItem> findContentItemsByWidgetId(Long id)
WidgetServicefindContentItemsByWidgetId in interface WidgetServiceItems@Transactional(value="blTransactionManager") public Widget saveWidget(Widget widget)
WidgetServicesaveWidget in interface WidgetServicepublic String getWidgetClasspathPath(String pathPrefix, Widget widget)
WidgetServicegetWidgetClasspathPath in interface WidgetServicepublic String replaceCssThemeFields(String resourceData)
WidgetServicereplaceCssThemeFields in interface WidgetServiceresourceData - the widget css dataCopyright © 2020. All rights reserved.