use of org.entando.entando.aps.system.services.cache.ICacheInfoManager in project entando-core by entando.
the class SocialActivityStreamManager method updateFromProfileChanged.
@Override
public void updateFromProfileChanged(ProfileChangedEvent event) {
try {
ICacheInfoManager cacheInfoManager = (ICacheInfoManager) this.getBeanFactory().getBean(SystemConstants.CACHE_INFO_MANAGER);
cacheInfoManager.flushGroup(ICacheInfoManager.DEFAULT_CACHE_NAME, "ActivityStreamLikeRecords_cacheGroup");
} catch (Throwable t) {
_logger.error("Error flushing cache group", t);
}
}
use of org.entando.entando.aps.system.services.cache.ICacheInfoManager in project entando-core by entando.
the class TestApplicationContext method testGetServices.
public void testGetServices() {
ConfigInterface configManager = (ConfigInterface) this.getService(SystemConstants.BASE_CONFIG_MANAGER);
assertNotNull(configManager);
ICacheInfoManager cacheInfoManager = (ICacheInfoManager) this.getService(SystemConstants.CACHE_INFO_MANAGER);
assertNotNull(cacheInfoManager);
ILangManager langManager = (ILangManager) this.getService(SystemConstants.LANGUAGE_MANAGER);
assertNotNull(langManager);
IWidgetTypeManager showletTypeManager = (IWidgetTypeManager) this.getService(SystemConstants.WIDGET_TYPE_MANAGER);
assertNotNull(showletTypeManager);
IPageModelManager pageModelManager = (IPageModelManager) this.getService(SystemConstants.PAGE_MODEL_MANAGER);
assertNotNull(pageModelManager);
IPageManager pageManager = (IPageManager) this.getService(SystemConstants.PAGE_MANAGER);
assertNotNull(pageManager);
IRoleManager roleManager = (IRoleManager) this.getService(SystemConstants.ROLE_MANAGER);
assertNotNull(roleManager);
IUserManager userManager = (IUserManager) this.getService(SystemConstants.USER_MANAGER);
assertNotNull(userManager);
IURLManager urlManager = (IURLManager) this.getService(SystemConstants.URL_MANAGER);
assertNotNull(urlManager);
II18nManager i18nManager = (II18nManager) this.getService(SystemConstants.I18N_MANAGER);
assertNotNull(i18nManager);
// ControllerManager controller = (ControllerManager) this.getService(SystemConstants.CONTROLLER_MANAGER);
// assertNotNull(controller);
IKeyGeneratorManager keyGeneratorManager = (IKeyGeneratorManager) this.getService(SystemConstants.KEY_GENERATOR_MANAGER);
assertNotNull(keyGeneratorManager);
ICategoryManager categoryManager = (ICategoryManager) this.getService(SystemConstants.CATEGORY_MANAGER);
assertNotNull(categoryManager);
}
use of org.entando.entando.aps.system.services.cache.ICacheInfoManager in project entando-core by entando.
the class SocialActivityStreamManager method listenDeleteActionRecord.
@Before("execution(* org.entando.entando.aps.system.services.actionlog.IActionLogManager.deleteActionRecord(..)) && args(id,..)")
public void listenDeleteActionRecord(Integer id) {
try {
ICacheInfoManager cacheInfoManager = (ICacheInfoManager) this.getBeanFactory().getBean(SystemConstants.CACHE_INFO_MANAGER);
cacheInfoManager.flushEntry(ICacheInfoManager.DEFAULT_CACHE_NAME, "ActivityStreamCommentRecords_id_" + id);
cacheInfoManager.flushEntry(ICacheInfoManager.DEFAULT_CACHE_NAME, "ActivityStreamLikeRecords_id_" + id);
this.getSocialActivityStreamDAO().deleteSocialRecordsRecord(id);
} catch (Throwable t) {
_logger.error("Error deleting action record", t);
}
}
Aggregations