Class ContextBatch
java.lang.Object
com.atlassian.plugin.webresource.legacy.ContextBatch
An intermediary object used for constructing and merging context batches.
This is a bean that holds the different resources and parameters that apply
to a particular batch.
The batch can both include and exclude one or more contexts
Resources are expected to be in dependency order, with no duplicates.
-
Constructor Summary
ConstructorsConstructorDescriptionContextBatch(List<String> contexts, Iterable<String> excludedContexts, Iterable<ModuleDescriptorStub> resources, boolean removeSuperResources) -
Method Summary
Modifier and TypeMethodDescriptionIterates over the batch parameters for the context and creates aContextBatchPluginResourcefor each.booleangetKey()inthashCode()booleanisEmpty()boolean
-
Constructor Details
-
ContextBatch
public ContextBatch(List<String> contexts, Iterable<String> excludedContexts, Iterable<ModuleDescriptorStub> resources, boolean removeSuperResources) - Parameters:
contexts- the ordering of contexts is important since it determines the ordering of resources within a batch (which could be important for badly written Javascripts).excludedContexts- the ordering of excluded contexts is not important.
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
isRemoveSuperResources
public boolean isRemoveSuperResources() -
buildPluginResources
Iterates over the batch parameters for the context and creates aContextBatchPluginResourcefor each.It should be noted that the created
ContextBatchPluginResourcewill not actually contain anyDownloadableResource. ThePluginResourcecreated is primarily representing a URL to be used in constructing a particular resource/download reference.- Returns:
- ContextBatchPluginResource instances, although containing no
DownloadableResources.
-
getContexts
-
getExcludedContexts
-
getResources
-
equals
-
hashCode
public int hashCode() -
getKey
-