com.atlassian.plugin.webresource
Class ContextBatchSubResourceBuilder

java.lang.Object
  extended by 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

Field Summary
static Pattern CONTEXT_BATCH_PATTERN
           
 
Constructor Summary
ContextBatchSubResourceBuilder(com.atlassian.plugin.webresource.ResourceDependencyResolver dependencyResolver, com.atlassian.plugin.webresource.DownloadableResourceFinder resourceFinder)
           
 
Method Summary
 boolean matches(String path)
          Returns true if the builder can parse the given url
 DownloadableResource parse(String path, Map<String,String> params)
          Parses the url and params and then builds a resource to upload If the resource cannot be found null is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_BATCH_PATTERN

public static final Pattern CONTEXT_BATCH_PATTERN
Constructor Detail

ContextBatchSubResourceBuilder

public ContextBatchSubResourceBuilder(com.atlassian.plugin.webresource.ResourceDependencyResolver dependencyResolver,
                                      com.atlassian.plugin.webresource.DownloadableResourceFinder resourceFinder)
Method Detail

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 url
params - - 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.