use of com.agiletec.aps.system.services.page.events.PageChangedEvent in project entando-core by entando.
the class CacheInfoManagerTest method updateFromPageChanged.
@Test
public void updateFromPageChanged() throws Throwable {
PageChangedEvent event = new PageChangedEvent();
Page page = new Page();
page.setCode("code");
event.setPage(page);
cacheInfoManager.updateFromPageChanged(event);
Mockito.verify(cache, Mockito.times(1)).get(Mockito.anyString());
Mockito.verify(cache, Mockito.times(1)).put(Mockito.anyString(), Mockito.any(Map.class));
Object requiredMap = cacheInfoManager.getFromCache(ICacheInfoManager.CACHE_INFO_MANAGER_CACHE_NAME, ICacheInfoManager.GROUP_CACHE_NAME_PREFIX + ICacheInfoManager.CACHE_INFO_MANAGER_CACHE_NAME);
Assert.assertTrue(requiredMap instanceof Map);
Assert.assertNotNull(requiredMap);
Assert.assertEquals(2, ((Map) requiredMap).size());
}
use of com.agiletec.aps.system.services.page.events.PageChangedEvent in project entando-core by entando.
the class PageManager method notifyPageChangedEvent.
private void notifyPageChangedEvent(IPage page, int operationCode, Integer framePos) {
PageChangedEvent event = buildEvent(page, operationCode, framePos);
this.notifyEvent(event);
}
use of com.agiletec.aps.system.services.page.events.PageChangedEvent in project entando-core by entando.
the class PageManager method buildEvent.
private PageChangedEvent buildEvent(IPage page, int operationCode, Integer framePos) {
PageChangedEvent event = new PageChangedEvent();
event.setPage(page);
event.setOperationCode(operationCode);
if (null != framePos) {
event.setFramePosition(framePos);
}
return event;
}
use of com.agiletec.aps.system.services.page.events.PageChangedEvent in project entando-core by entando.
the class PageManager method notifyPageChangedEvent.
private void notifyPageChangedEvent(IPage page, int operationCode, Integer framePos, String eventType) {
PageChangedEvent event = buildEvent(page, operationCode, framePos);
event.setEventType(eventType);
this.notifyEvent(event);
}
Aggregations