public class ResourceUrlParser extends Object
AbstractFileServerServlet.SERVLET_PATH, the 'strategyPrefix' is defined by a constructor parameter,
the remainder is parsed by this parser into a PluginResource.| Constructor and Description |
|---|
ResourceUrlParser(String strategyPrefix)
Deprecated.
Create a parser with the given strategy prefix for parsing URLs.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(String resourceUrl)
Deprecated.
Returns true if the provided URL matches a the URL prefix defined for this download strategy.
|
com.atlassian.plugin.servlet.PluginResource |
parse(String resourceUrl)
Deprecated.
Parses resource download URLs for this plugin resource download strategy, returning a
PluginResource. |
public ResourceUrlParser(String strategyPrefix)
AbstractFileServerServlet.SERVLET_PATH.)strategyPrefix - a String which will be found following 'download' at the start of matching URLs.public com.atlassian.plugin.servlet.PluginResource parse(String resourceUrl)
PluginResource.
Returns null if the URL does not match (i.e. matches(String) returns false), or the
final part of the URL cannot be split into a moduleCompleteKey and resourceName (i.e. there's no slash in the
final component).
Parsing uses the download strategy prefix to determine where in the URL string to start. The strategy prefix and
one character following it (typically a slash) is skipped, then the remainder is split on the first slash found.resourceUrl - the URL of the resource requestpublic boolean matches(String resourceUrl)
resourceUrl - the URL of the resource requestCopyright © 2014 Atlassian. All rights reserved.