@Test public void testGetLink() { assertEquals(livePath, liveUrl.getLink()); assertEquals(livePath, liveUrlWithPort.getLink()); assertTrue(flavoredLiveUrl.getLink().endsWith(flavoredPath)); assertTrue(localizedLiveUrl.getLink().endsWith(localizedPath)); assertTrue(flavoredLocalizedLiveUrl.getLink().endsWith(flavoredLocalizedPath)); assertTrue(flavoredSegmentedLiveUrl.getLink().endsWith(flavoredPath)); assertTrue(localizedSegmentedLiveUrl.getLink().endsWith(localizedPath)); assertTrue(flavoredLocalizedSegmentedLiveUrl.getLink().endsWith(flavoredLocalizedPath)); assertEquals(versionedPath, versionedUrl.getLink()); assertTrue(flavoredVersionedUrl.getLink().endsWith(flavoredVersionedPath)); assertTrue(localizedVersionedUrl.getLink().endsWith(localizedVersionedPath)); assertTrue(flavoredLocalizedVersionedUrl.getLink().endsWith(flavoredLocalizedVersionedPath)); }
public String getLink() { if (link == null) { try { link = URLEncoder.encode(getLink(-1, null, null), "utf-8"); } catch (UnsupportedEncodingException e) { logger.error("Unexpected error while urlencoding link {}", link, e); } link = link.replaceAll("%2F", "/"); } return link; }
WebUrlImpl extends UrlImpl implements WebUrl { public String getLink() { if (link == null) { try { link = URLEncoder.encode(getLink(-1, null, null), "utf-8"); } catch (UnsupportedEncodingException e) { logger.error("Unexpected error while urlencoding link {}", link, e); } link = link.replaceAll("%2F", "/"); } return link; } }
WebUrlImpl extends UrlImpl implements WebUrl { public String getLink() { if (link == null) { try { link = URLEncoder.encode(getLink(-1, null, null), "utf-8"); } catch (UnsupportedEncodingException e) { logger.error("Unexpected error while urlencoding link {}", link, e); } link = link.replaceAll("%2F", "/"); } return link; } WebUrlImpl(Site site, String path);  WebUrlImpl(Site site, Path url);  WebUrlImpl(Site site, Path url, String path);  WebUrlImpl(Site site, String path, long version);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor,
      Language language);  WebUrlImpl(WebUrlImpl url, String path); }
WebUrlImpl extends UrlImpl implements WebUrl { public String getLink() { if (link == null) { try { link = URLEncoder.encode(getLink(-1, null, null), "utf-8"); } catch (UnsupportedEncodingException e) { logger.error("Unexpected error while urlencoding link {}", link, e); } link = link.replaceAll("%2F", "/"); } return link; } WebUrlImpl(Site site, String path);  WebUrlImpl(Site site, Path url);  WebUrlImpl(Site site, Path url, String path);  WebUrlImpl(Site site, String path, long version);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor,
      Language language);  WebUrlImpl(WebUrlImpl url, String path); Site getSite(); String getLink(); String getLink(long version); String getLink(Language language); String getLink(String flavor); String getLink(long version, Language language, String flavor); String normalize(); String normalize(boolean includeVersion, boolean includeLanguage,
      boolean includeFlavor); RequestFlavor getFlavor(); long getVersion(); Language getLanguage(); boolean hasLanguagePathSegment(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); }
WebUrlImpl extends UrlImpl implements WebUrl { public String getLink() { if (link == null) { try { link = URLEncoder.encode(getLink(-1, null, null), "utf-8"); } catch (UnsupportedEncodingException e) { logger.error("Unexpected error while urlencoding link {}", link, e); } link = link.replaceAll("%2F", "/"); } return link; } WebUrlImpl(Site site, String path);  WebUrlImpl(Site site, Path url);  WebUrlImpl(Site site, Path url, String path);  WebUrlImpl(Site site, String path, long version);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor);  WebUrlImpl(Site site, String path, long version, RequestFlavor flavor,
      Language language);  WebUrlImpl(WebUrlImpl url, String path); Site getSite(); String getLink(); String getLink(long version); String getLink(Language language); String getLink(String flavor); String getLink(long version, Language language, String flavor); String normalize(); String normalize(boolean includeVersion, boolean includeLanguage,
      boolean includeFlavor); RequestFlavor getFlavor(); long getVersion(); Language getLanguage(); boolean hasLanguagePathSegment(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString();  }