Class DefaultResourceDependencyResolver

java.lang.Object
com.atlassian.plugin.webresource.legacy.DefaultResourceDependencyResolver
All Implemented Interfaces:
ResourceDependencyResolver

public class DefaultResourceDependencyResolver extends Object implements ResourceDependencyResolver
  • Constructor Details

    • DefaultResourceDependencyResolver

      public DefaultResourceDependencyResolver(Globals globals, WebResourceIntegration webResourceIntegration, boolean isSuperBatchingEnabled, List<String> superBatchModuleCompleteKeys)
  • Method Details

    • getSuperBatchDependencies

      public Iterable<ModuleDescriptorStub> getSuperBatchDependencies()
      Description copied from interface: ResourceDependencyResolver
      Returns an ordered set of the super batch resources and its dependencies. If no super batch resources are defined an empty set is returned. Implementations are expected to use the ResourceBatchingConfiguration provided.
      Specified by:
      getSuperBatchDependencies in interface ResourceDependencyResolver
      Returns:
      an ordered set of the super batch resources and its dependencies.
    • getDependencies

      public Iterable<ModuleDescriptorStub> getDependencies(RequestCache requestCache, UrlBuildingStrategy urlBuildingStrategy, String moduleKey, boolean excludeSuperBatchedResources, boolean includeDependenciesForFailedUrlReadingConditions)
      Description copied from interface: ResourceDependencyResolver
      Returns an ordered set of the given resource and its dependencies. To exclude resource dependencies in the super batch, pass excludeSuperBatchedResources as true. If the resources cannot be resolved an empty set is returned.
      Specified by:
      getDependencies in interface ResourceDependencyResolver
      moduleKey - the complete module key of the web resource to retrieve dependencies for
      excludeSuperBatchedResources - whether or not to exclude resources that are part of the super batch.
      Returns:
      an ordered set of the given resource and its dependencies
    • getDependenciesInContext

      public Iterable<ModuleDescriptorStub> getDependenciesInContext(RequestCache requestCache, UrlBuildingStrategy urlBuildingStrategy, String context, Set<String> skippedResources, boolean includeDependenciesForFailedUrlReadingConditions)
      Description copied from interface: ResourceDependencyResolver
      Returns an ordered list of the resources in a given context and its dependencies. Dependencies with conditions are not included and are added to the parameter skippedResources Resources also in the superbatch are not included. If no resources are defined for the given context an empty set is returned.
      Specified by:
      getDependenciesInContext in interface ResourceDependencyResolver
      context - - the context to retrieve dependencies from.
      skippedResources - - a list that all the resources that are skipped are added to.
      Returns:
      an ordered list of the resources in a given context and its dependencies.
    • getDependenciesInContext

      public Iterable<ModuleDescriptorStub> getDependenciesInContext(RequestCache requestCache, UrlBuildingStrategy urlBuildingStrategy, String context, boolean excludeSuperBatchedResources, Set<String> skippedResources, boolean includeDependenciesForFailedUrlReadingConditions)