docs: @Override
      public String getPortletTitle(
              IPortletWindowId portletWindowId,
              HttpServletRequest request,
              HttpServletResponse response) {
          final IPortletDefinition portletDefinition = getPortletDefinition(portletWindowId, request);
          final IPortletDefinitionParameter disableDynamicTitle =
                  portletDefinition.getParameter("disableDynamicTitle");
  
          if (disableDynamicTitle == null || !Boolean.parseBoolean(disableDynamicTitle.getValue())) {
              try {
                  final PortletRenderResult portletRenderResult =
                          getPortletRenderResult(portletWindowId, request, response);
                  if (portletRenderResult != null) {
                      final String title = portletRenderResult.getTitle();
                      if (title != null) {
                          return title;
                      }
                  }
              } catch (Exception e) {
                  logger.warn(
                          "unable to get portlet title, falling back to title defined in channel definition for portletWindowId "
                                  + portletWindowId);
              }
          }
  
          // we assume that response locale has been set to correct value
          String locale = response.getLocale().toString();
  
          // return portlet title from channel definition
          return portletDefinition.getTitle(locale);
      }