예제 #1
0
  @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;
  }
예제 #2
0
  @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;
  }