|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.servlet.ResourceUrlParser
public class ResourceUrlParser
Parses resource download URLs for a plugin resource download strategy, and can determine whether a given URL is valid for that download strategy.
The URLs are in the form "/servletPath/strategyPrefix/moduleCompleteKey/resourceName", where the 'servletPath' is defined asAbstractFileServerServlet.SERVLET_PATH, the 'strategyPrefix' is defined by a constructor parameter,
the remainder is parsed by this parser into a PluginResource.
| Constructor Summary | |
|---|---|
ResourceUrlParser(String strategyPrefix)
Deprecated. Create a parser with the given strategy prefix for parsing URLs. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceUrlParser(String strategyPrefix)
AbstractFileServerServlet.SERVLET_PATH.)
strategyPrefix - a String which will be found following 'download' at the start of matching URLs.| Method Detail |
|---|
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 request
public boolean matches(String resourceUrl)
resourceUrl - the URL of the resource request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||