Search in sources :

Example 1 with WidgetTypeDAO

use of org.entando.entando.aps.system.services.widgettype.WidgetTypeDAO in project entando-core by entando.

the class TestWidgetTypeDAO method testLoadWidgetTypes.

public void testLoadWidgetTypes() throws Throwable {
    DataSource dataSource = (DataSource) this.getApplicationContext().getBean("portDataSource");
    WidgetTypeDAO widgetTypeDao = new WidgetTypeDAO();
    widgetTypeDao.setDataSource(dataSource);
    ILangManager langManager = (ILangManager) this.getService(SystemConstants.LANGUAGE_MANAGER);
    widgetTypeDao.setLangManager(langManager);
    Map<String, WidgetType> types = null;
    try {
        types = widgetTypeDao.loadWidgetTypes();
    } catch (Throwable t) {
        throw t;
    }
    WidgetType showletType = (WidgetType) types.get("content_viewer");
    assertNotNull(showletType);
    showletType = (WidgetType) types.get("content_viewer_list");
    assertNotNull(showletType);
}
Also used : ILangManager(com.agiletec.aps.system.services.lang.ILangManager) WidgetTypeDAO(org.entando.entando.aps.system.services.widgettype.WidgetTypeDAO) WidgetType(org.entando.entando.aps.system.services.widgettype.WidgetType) DataSource(javax.sql.DataSource)

Aggregations

ILangManager (com.agiletec.aps.system.services.lang.ILangManager)1 DataSource (javax.sql.DataSource)1 WidgetType (org.entando.entando.aps.system.services.widgettype.WidgetType)1 WidgetTypeDAO (org.entando.entando.aps.system.services.widgettype.WidgetTypeDAO)1