if (null == currentUser) {
currentUser = this.getUserManager().getGuestUser();
this.getRequest().getSession().setAttribute(SystemConstants.SESSIONPARAM_CURRENT_USER, currentUser);
}
if (!currentUser.getUsername().equals(SystemConstants.GUEST_USER_NAME)) {
CustomPageConfig customUserPageConfig = null;
PageUserConfigBean pageUserConfigBean =
(PageUserConfigBean) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG);
if (null == pageUserConfigBean) {
ApsSystemUtils.getLogger().info("No Page User Config by user " + currentUser.getUsername());
pageUserConfigBean = this.createNewPageUserConfig(infos, currentUser, currentPage);
this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_USER_PAGE_CONFIG, pageUserConfigBean);
customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
} else {
customUserPageConfig = pageUserConfigBean.getConfig().get(currentPage.getCode());
if (null == customUserPageConfig) {
customUserPageConfig = this.createNewPageConfig(infos, currentPage);
pageUserConfigBean.getConfig().put(currentPage.getCode(), customUserPageConfig);
} else {
this.updatePageConfig(customUserPageConfig, infos);
}
}
this.getRequest().getSession().setAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG, customUserPageConfig);
} else {
CustomPageConfig customGuestPageConfig =
(CustomPageConfig) this.getRequest().getSession().getAttribute(JpmyportalplusSystemConstants.SESSIONPARAM_CURRENT_CUSTOM_PAGE_CONFIG);
if (null != customGuestPageConfig) {
this.updatePageConfig(customGuestPageConfig, infos);
} else {
customGuestPageConfig = this.createNewPageConfig(infos, currentPage);