public class UrlGenerationHelpers extends BaseHelpers
| Modifier and Type | Class and Description |
|---|---|
static class |
UrlGenerationHelpers.CalculatedBatches
DTO.
|
static class |
UrlGenerationHelpers.ContextBatch
Data structure representing Context Batch, it is used in cache and shouldn't contain any references.
|
static class |
UrlGenerationHelpers.ContextBatchKey
Data structure representing Web Resource Batch Key.
|
static class |
UrlGenerationHelpers.ParamsComparator
Comparator for sorting sub batches.
|
static class |
UrlGenerationHelpers.Resolved
DTO.
|
protected static class |
UrlGenerationHelpers.SplitSubBatches
Temporary data structure used during splitting batches into sub batches.
|
static class |
UrlGenerationHelpers.SubBatch
Data structure representing Sub Batch of both Web Resource Batch and Context Batch, it is used in cache and
shouldn't contain any references.
|
static class |
UrlGenerationHelpers.WebResourceBatch
Data structure representing Web Resource Batch, it is used in cache and shouldn't contain any references.
|
BaseHelpers.BundleFinder, BaseHelpers.Found, BaseHelpers.ResourceFinder| Constructor and Description |
|---|
UrlGenerationHelpers() |
| Modifier and Type | Method and Description |
|---|---|
protected static LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> |
buildDataResources(RequestState requestState,
List<String> webResourceKeys)
Build data resources.
|
protected static UrlCache.IncludedExcludedConditionsAndBatchingOptions |
buildIncludedExcludedConditionsAndBatchingOptions(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
LinkedHashSet<String> included,
LinkedHashSet<String> excluded)
Building the cache key of included, excluded and conditions.
|
protected static UrlGenerationHelpers.CalculatedBatches |
calculateBatches(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
LinkedHashSet<String> included,
LinkedHashSet<String> excluded)
Calculate batches.
|
protected static List<ResourceUrl> |
collectUrlStateAndBuildResourceUrls(RequestState requestState,
UrlBuildingStrategy urlBuilderStrategy,
List<UrlGenerationHelpers.ContextBatch> contextBatches,
List<UrlGenerationHelpers.WebResourceBatch> webResourceBatches)
Collect URL State for Conditions and Transformers and build Resource URLs.
|
protected static List<ResourceUrl> |
createResourceUrlsForRedirectResources(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
List<Resource> resources)
Creates Resource URLs for redirect resources.
|
protected static com.atlassian.plugin.webresource.impl.helpers.StateEncodedUrlResult |
encodeStateInUrlIfSupported(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
String type,
Map<String,String> params,
Bundle bundle,
List<Bundle> skipped,
List<Bundle> excludedWithoutApplyingConditions)
Collect and encode URL state for given Resources, it collects resource params, condition params and
transformer params.
|
protected static com.atlassian.plugin.webresource.impl.helpers.StateEncodedUrlResult |
encodeStateInUrlIfSupported(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
String type,
Map<String,String> params,
List<Bundle> bundles,
List<Bundle> skipped,
List<Bundle> excludedWithoutApplyingConditions)
Collect and encode URL state for given Resources, it collects resource params, condition params and
transformer params.
|
protected static Set<CachedCondition> |
getConditions(RequestCache requestCache,
UrlCache.IncludedAndExcluded includedAndExcluded,
UrlBuildingStrategy urlBuilderStrategy)
Get web resources with conditions, the subset of the resolve web resources for given set of included and excluded.
|
static UrlGenerationHelpers.Resolved |
resolve(RequestState requestState)
Resolve given included and excluded resources.
|
static LinkedHashSet<String> |
resolveExcluded(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
List<String> allIncluded,
LinkedHashSet<String> allExcluded)
Resolves list of excluded resources.
|
static List<Resource> |
resourcesOfType(Collection<Resource> resources,
String type)
Get resources of given type.
|
protected static UrlGenerationHelpers.SplitSubBatches |
splitBatchIntoSubBatches(RequestCache requestCache,
Iterable<String> completeKeys,
boolean doSorting)
Split batch into sub batches and standalone resources, same code used to split both context and resource batches.
|
protected static Tuple<List<UrlGenerationHelpers.ContextBatch>,List<UrlGenerationHelpers.WebResourceBatch>> |
splitIntoSubBatches(RequestCache requestCache,
UrlBuildingStrategy urlBuilderStrategy,
List<UrlGenerationHelpers.ContextBatchKey> contextBatchKeys,
List<String> webResourceBatchKeys)
Split batches into sub batches grouped by URL parameters and set of standalone resources.
|
find, find, findItChangesArguments, getResources, hasConditions, hasLegacyCondition, isConditionsSatisfied, isConditionsSatisfiedpublic static UrlGenerationHelpers.Resolved resolve(RequestState requestState)
protected static UrlCache.IncludedExcludedConditionsAndBatchingOptions buildIncludedExcludedConditionsAndBatchingOptions(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, LinkedHashSet<String> included, LinkedHashSet<String> excluded)
protected static Set<CachedCondition> getConditions(RequestCache requestCache, UrlCache.IncludedAndExcluded includedAndExcluded, UrlBuildingStrategy urlBuilderStrategy)
public static LinkedHashSet<String> resolveExcluded(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, List<String> allIncluded, LinkedHashSet<String> allExcluded)
requestCache - request cache.allIncluded - included web resources and contexts.allExcluded - excluded web resources and contexts.protected static UrlGenerationHelpers.CalculatedBatches calculateBatches(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, LinkedHashSet<String> included, LinkedHashSet<String> excluded)
protected static LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> buildDataResources(RequestState requestState, List<String> webResourceKeys)
protected static List<ResourceUrl> collectUrlStateAndBuildResourceUrls(RequestState requestState, UrlBuildingStrategy urlBuilderStrategy, List<UrlGenerationHelpers.ContextBatch> contextBatches, List<UrlGenerationHelpers.WebResourceBatch> webResourceBatches)
protected static Tuple<List<UrlGenerationHelpers.ContextBatch>,List<UrlGenerationHelpers.WebResourceBatch>> splitIntoSubBatches(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, List<UrlGenerationHelpers.ContextBatchKey> contextBatchKeys, List<String> webResourceBatchKeys)
contextBatchKeys - keys of context batcheswebResourceBatchKeys - keys of web resource batches.protected static UrlGenerationHelpers.SplitSubBatches splitBatchIntoSubBatches(RequestCache requestCache, Iterable<String> completeKeys, boolean doSorting)
completeKeys - list of complete keys that the batch contains.doSorting - some legacy stuff, in some cases it sorted in some not.public static List<Resource> resourcesOfType(Collection<Resource> resources, String type)
protected static com.atlassian.plugin.webresource.impl.helpers.StateEncodedUrlResult encodeStateInUrlIfSupported(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, String type, Map<String,String> params, Bundle bundle, List<Bundle> skipped, List<Bundle> excludedWithoutApplyingConditions)
protected static com.atlassian.plugin.webresource.impl.helpers.StateEncodedUrlResult encodeStateInUrlIfSupported(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, String type, Map<String,String> params, List<Bundle> bundles, List<Bundle> skipped, List<Bundle> excludedWithoutApplyingConditions)
protected static List<ResourceUrl> createResourceUrlsForRedirectResources(RequestCache requestCache, UrlBuildingStrategy urlBuilderStrategy, List<Resource> resources)
Copyright © 2019 Atlassian. All rights reserved.