docs: protected IPortalCookie getOrCreatePortalCookie(HttpServletRequest request) {
          IPortalCookie result = null;
  
          // first check in request
          final Cookie cookie = this.getCookieFromRequest(this.cookieName, request);
          if (cookie != null) {
              // found a potential cookie, call off to the dao
              final String value = cookie.getValue();
              result = this.portletCookieDao.getPortalCookie(value);
          }
  
          // still null? check in the session
          if (result == null) {
              result = locatePortalCookieInSession(request.getSession());
          }
          // if by this point we still haven't found the portal cookie, create one
          if (result == null) {
              result = this.portletCookieDao.createPortalCookie(this.maxAge);
              // store the portal cookie value value in the session
              HttpSession session = request.getSession();
              synchronized (WebUtils.getSessionMutex(session)) {
                  session.setAttribute(SESSION_ATTRIBUTE__PORTAL_COOKIE_ID, result.getValue());
              }
          }
  
          return result;
      }