com.day.cq.rewriter.linkchecker.impl
Class LinkUrl
java.lang.Object
com.day.cq.rewriter.linkchecker.impl.LinkUrl
public final class LinkUrl
- extends Object
This class contains utility functions for working with link URLs.
|
Method Summary |
static String |
getBaseUrl(String url)
Removes potential anchor (#...) and parameter (?...) parts and
returns the remaining base prefix of the given URL. |
static boolean |
isSpecial(String url)
Checks whether the given URL is a special link that should always
be considered valid and not modified by the link transformer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkUrl
public LinkUrl()
isSpecial
public static boolean isSpecial(String url)
- Checks whether the given URL is a special link that should always
be considered valid and not modified by the link transformer.
Special links are:
- empty links
- internal links within a page (#something)
mailto: links
javascript: links
- Parameters:
url - the URL to check
- Returns:
true if the URL is a special link,
false otherwise
getBaseUrl
public static String getBaseUrl(String url)
- Removes potential anchor (#...) and parameter (?...) parts and
returns the remaining base prefix of the given URL. The returned
base part is always a prefix of or equal to the given URL.
- Parameters:
url - the URL
- Returns:
- base part of the URL
Copyright © 2008 Day Management AG. All Rights Reserved.