Package org.xwiki.url
Offers APIs to convert URLs into Resource Reference objects and vice-versa.
All XWiki modules should use this API when they need to manipulate URLs and should not manipulate the JDK's URL class. The reasons are:
- reduce bugs: this module is well-tested, handles escaping and encoding properly, and more. It's likely that manipulating URLs by yourself would lead to bugs, especially since there are limitations with the JDK's URL implementation.
- allows plugging different XWiki URL schemes without having to change any other part of the code.
The only places where it's allowed to see the JDK's URL class is in system boundary code, in code accepting an external URL and transforming it into a XWiki Resource Reference and in code generating a URL from a XWiki Resource Reference for outside processes.
-
Interface Summary Interface Description URLConfiguration Configuration options for the URL module.URLContextManager Access various URL-related items from the Execution Context; for example access the current URL scheme.URLNormalizer<T> Normalize a relative URL.URLSecurityManager Dedicated component to perform security checks on URLs. -
Class Summary Class Description ExtendedURL Extend aURL
by providing access to the URL path segments (URL-decoded).