com.atlassian.plugin.webresource
Class ContextBatchSubResourceBuilder
java.lang.Object
com.atlassian.plugin.webresource.ContextBatchSubResourceBuilder
public class ContextBatchSubResourceBuilder
- extends Object
Provides a fallback to serve resources relative to a context batch resource
In practice, the resources url should be transformed via the
{{com.atlassian.plugin.webresource.RelativeURLTransformResource}}.
This builder is in place in case this does not happen
- Since:
- 2.9.0
|
Constructor Summary |
ContextBatchSubResourceBuilder(com.atlassian.plugin.webresource.ResourceDependencyResolver dependencyResolver,
com.atlassian.plugin.webresource.DownloadableResourceFinder resourceFinder)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONTEXT_BATCH_PATTERN
public static final Pattern CONTEXT_BATCH_PATTERN
ContextBatchSubResourceBuilder
public ContextBatchSubResourceBuilder(com.atlassian.plugin.webresource.ResourceDependencyResolver dependencyResolver,
com.atlassian.plugin.webresource.DownloadableResourceFinder resourceFinder)
matches
public boolean matches(String path)
- Returns true if the builder can parse the given url
- Parameters:
path - - the url to parse
- Returns:
- true if the builder can parse the given url
parse
public DownloadableResource parse(String path,
Map<String,String> params)
throws UrlParseException
- Parses the url and params and then builds a resource to upload
If the resource cannot be found null is returned.
- Parameters:
path - - the urlparams - - query parameters provided in the url
- Returns:
- a resource to upload
- Throws:
UrlParseException - - if the path cannot be parsed
Copyright © 2013 Atlassian. All Rights Reserved.