com.atlassian.plugin.webresource
Class SuperBatchSubResourceBuilder

java.lang.Object
  extended by com.atlassian.plugin.webresource.SuperBatchSubResourceBuilder

public class SuperBatchSubResourceBuilder
extends Object

Provides a fallback to serve resources relative to a super 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
SuperBatchSubResourceBuilder(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
 

Constructor Detail

SuperBatchSubResourceBuilder

public SuperBatchSubResourceBuilder(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 © 2011 Atlassian. All Rights Reserved.