Search in sources :

Example 46 with PageModel

use of com.agiletec.aps.system.services.pagemodel.PageModel in project entando-core by entando.

the class PageManager method updateFromPageModelChanged.

@Override
public void updateFromPageModelChanged(PageModelChangedEvent event) {
    try {
        if (event.getOperationCode() != PageModelChangedEvent.UPDATE_OPERATION_CODE) {
            return;
        }
        PageModel model = event.getPageModel();
        String pageModelCode = (null != model) ? model.getCode() : null;
        if (null != pageModelCode) {
            List<?> utilizers = this.getPageModelUtilizers(pageModelCode);
            if (null != utilizers && utilizers.size() > 0) {
                this.init();
            }
        }
    } catch (Throwable t) {
        _logger.error("Error during refres pages", t);
    }
}
Also used : PageModel(com.agiletec.aps.system.services.pagemodel.PageModel)

Example 47 with PageModel

use of com.agiletec.aps.system.services.pagemodel.PageModel in project entando-core by entando.

the class PageModelManagerCacheWrapper method initCache.

@Override
public void initCache(IPageModelDAO pageModelDAO) throws ApsSystemException {
    try {
        Cache cache = this.getCache();
        this.releaseCachedObjects(cache);
        Map<String, PageModel> models = pageModelDAO.loadModels();
        this.insertObjectsOnCache(cache, models);
    } catch (Throwable t) {
        _logger.error("Error loading page models", t);
        throw new ApsSystemException("Error loading page models", t);
    }
}
Also used : ApsSystemException(com.agiletec.aps.system.exception.ApsSystemException) PageModel(com.agiletec.aps.system.services.pagemodel.PageModel) Cache(org.springframework.cache.Cache)

Aggregations

PageModel (com.agiletec.aps.system.services.pagemodel.PageModel)47 IPage (com.agiletec.aps.system.services.page.IPage)13 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)11 Page (com.agiletec.aps.system.services.page.Page)10 Widget (com.agiletec.aps.system.services.page.Widget)10 ApsProperties (com.agiletec.aps.util.ApsProperties)10 PageMetadata (com.agiletec.aps.system.services.page.PageMetadata)9 ArrayList (java.util.ArrayList)8 List (java.util.List)8 RestServerError (org.entando.entando.aps.system.exception.RestServerError)7 BeanPropertyBindingResult (org.springframework.validation.BeanPropertyBindingResult)7 ValidationConflictException (org.entando.entando.web.common.exceptions.ValidationConflictException)6 Frame (com.agiletec.aps.system.services.pagemodel.Frame)5 Map (java.util.Map)5 RestRourceNotFoundException (org.entando.entando.aps.system.exception.RestRourceNotFoundException)5 WidgetConfigurationDto (org.entando.entando.aps.system.services.page.model.WidgetConfigurationDto)5 WidgetConfigurationRequest (org.entando.entando.web.page.model.WidgetConfigurationRequest)5 IPageModelManager (com.agiletec.aps.system.services.pagemodel.IPageModelManager)4 PageModelDOM (com.agiletec.aps.system.services.pagemodel.PageModelDOM)4 IDtoBuilder (org.entando.entando.aps.system.services.IDtoBuilder)4