code: public String getDetailName(CmsResource res, Locale locale, List<Locale> defaultLocales) throws CmsException {
  
          String urlName = readBestUrlName(res.getStructureId(), locale, defaultLocales);
          if (urlName == null) {
              urlName = res.getStructureId().toString();
          }
          return urlName;
      }
docs: Returns the detail name of a resource.<p>
  
  The detail view URI of a content element consists of its detail page URI and the detail name returned by this
  method.<p>
  
  @param res the resource for which the detail name should be retrieved
  @param locale the locale for the detail name
  @param defaultLocales the default locales for the detail name
  
  @return the detail name
  @throws CmsException if something goes wrong