String langCode = pageUrl.getLangCode();
ILangManager langManager =
(ILangManager) ApsWebApplicationUtils.getBean(SystemConstants.LANGUAGE_MANAGER, reqCtx.getRequest());
BaseConfigManager configManager =
(BaseConfigManager) ApsWebApplicationUtils.getBean(SystemConstants.BASE_CONFIG_MANAGER, reqCtx.getRequest());
ICasClientConfigManager casClientConfigManager =
(ICasClientConfigManager) ApsWebApplicationUtils.getBean(CasClientPluginSystemCostants.JPCASCLIENT_CONFIG_MANAGER, reqCtx.getRequest());
IPageManager pageManager =
(IPageManager) ApsWebApplicationUtils.getBean(SystemConstants.PAGE_MANAGER, reqCtx.getRequest());
Lang lang = langManager.getLang(langCode);
if (lang == null) {
lang = (Lang) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_LANG);
if (lang == null) {
lang = langManager.getDefaultLang();
}
}
String pageCode = pageUrl.getPageCode();
IPage page = pageManager.getPage(pageCode);
if (page == null) {
page = (IPage) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_CURRENT_PAGE);
}
if (page == null) {
page = pageManager.getRoot();
}
StringBuffer url = new StringBuffer();
String serverBaseUrl = casClientConfigManager.getClientConfig().getServerBaseURL();
if (serverBaseUrl.endsWith("/")) {
serverBaseUrl = serverBaseUrl.substring(0, serverBaseUrl.length()-1);
}
url.append(serverBaseUrl);