@RequestMapping(value = ViewPath.SERVICES_DETAIL, method = RequestMethod.GET) public String handleRequest( @PathVariable("site") String site, @PathVariable("name") String name, @PathVariable("sector") String sector, HttpServletRequest request, ModelMap model) throws UAQException { String view = null; String pageName = "servicecatalog"; String multiticket = (String) request.getSession().getAttribute("ticketid"); logger.debug("Multiticket is : " + multiticket); // String dept = getSite(sector); if (site.equals("uaq")) { view = "services.detail"; logger.enter("Get Services Detail | handle Request"); super.handleRequest(request, model); NavigationVO navigationVO = new NavigationVO(); navigationVO.setSite(sector); navigationVO.setLanguage(request.getParameter("languageCode")); navigationVO.setName(UrlTransliterationUtil.getString(name)); navigationVO.setTicketId(multiticket); GenericPageVO genericPageVO = null; NavigationVO navigation = contentReferneceDAO.findByPrimaryKey(navigationVO); try { AssetBean assetBean = AssetUtil.getAssetDetail(sector, "Content_C", navigation.getAssetId(), multiticket); ServicesVO serviceVO = (ServicesVO) this.mapper.mapAssetToVO(assetBean); navigationVO = null; navigationVO = new NavigationVO(); navigationVO.setSite(site); navigationVO.setLanguage(request.getParameter("languageCode")); navigationVO.setTicketId((String) request.getSession().getAttribute(SESSION_TICKET)); navigationVO.setName(UrlTransliterationUtil.getString(pageName)); genericPageVO = ((GenericPageService) genericPageService).getPageMetaData(navigationVO); model.addAttribute("serviceVO", serviceVO); model.addAttribute("pageMetadata", genericPageVO.getPageMetadataVO()); } catch (SSOException e) { logger.error("Error getting session " + e.getMessage()); } } return view; }
@RequestMapping(value = ViewPath.SITES_SERVICES_DETAIL, method = RequestMethod.GET) public String handleDetailRequest( @PathVariable("site") String site, @PathVariable("parent") String parent, @PathVariable("name") String name, HttpServletRequest request, ModelMap model) throws SSOException { String view = "sites.services.detail"; logger.enter("Get Sites Services Detail | handle Request"); super.handleDepartmentRequest(request, model, site); ServicesVO serviceVO = null; String pageName = "Services"; NavigationVO navigationVO = new NavigationVO(); navigationVO.setSite(site); navigationVO.setTicketId((String) request.getSession().getAttribute(SESSION_TICKET)); navigationVO.setName(UrlTransliterationUtil.getString(name)); navigationVO.setLanguage(request.getParameter("languageCode")); GenericPageVO genericPageVO = null; try { serviceVO = serviceDetailService.execute(navigationVO); navigationVO = null; navigationVO = new NavigationVO(); navigationVO.setSite(site); navigationVO.setTicketId((String) request.getSession().getAttribute(SESSION_TICKET)); navigationVO.setName(UrlTransliterationUtil.getString(pageName)); navigationVO.setLanguage(request.getParameter("languageCode")); genericPageVO = ((GenericPageService) genericPageService).getPageMetaData(navigationVO); model.addAttribute("serviceVO", serviceVO); model.addAttribute("landing", parent); model.addAttribute("pageMetadata", genericPageVO.getPageMetadataVO()); } catch (UAQException e) { logger.error("Error getting session " + e.getMessage()); } // model.addAttribute("pageMetadata", serviceVO.getPageMetadataVO()); return view; }
@RequestMapping( value = {ViewPath.SERVICES_CATALOG_PORTAL}, method = RequestMethod.GET) public String handleRequestPortalServices(HttpServletRequest request, ModelMap model) throws SSOException { String languageCode = request.getParameter("languageCode"); String multiticket = (String) request.getSession().getAttribute("ticketid"); String site = "uaq"; String pageName = ""; String source = (String) request.getServletPath(); if (source.contains("/")) { pageName = source.split("/")[2]; pageName = (pageName.split(".html")[0]); } NavigationVO navigationVO = new NavigationVO(); navigationVO.setSite(site); navigationVO.setLanguage(request.getParameter("languageCode")); navigationVO.setName(UrlTransliterationUtil.getString(pageName)); navigationVO.setTicketId(multiticket); logger.enter("Call Service for" + ViewPath.SERVICES_CATALOG); ServicesCatalogPageVO servicesCatalogPageVO = null; NavigationVO navigation; try { navigation = pageReferneceDAO.findByPrimaryKey(navigationVO); navigationVO.setAssetId(navigation.getAssetId()); servicesCatalogPageVO = ((ServicesCatalogPageService) servicesCatalogPageService).getPageVO(navigationVO); } catch (UAQException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } String view = "services.list"; super.handleRequest(request, model); Map<String, List<ServicesVO>> serviceMap = null; try { serviceMap = servicesService.getServices(languageCode); } catch (UAQException e) { // TODO Auto-generated catch block e.printStackTrace(); } model.addAttribute("servicesCatalogPageVO", servicesCatalogPageVO); model.addAttribute("serviceMap", serviceMap); model.addAttribute("languageCode", languageCode); model.addAttribute("pageMetadata", servicesCatalogPageVO.getPageMetadataVO()); return view; }