Class WebResourceModuleDescriptor

java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
com.atlassian.plugin.webresource.WebResourceModuleDescriptor
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<Void>, com.atlassian.plugin.Resourced, com.atlassian.plugin.ScopeAware, com.atlassian.plugin.StateAware, WebResourceModuleDescriptor

public class WebResourceModuleDescriptor extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void> implements WebResourceModuleDescriptor
A way of linking to web 'resources', such as javascript or css. This allows us to include resources once on any given page, as well as ensuring that plugins can declare resources, even if they are included at the bottom of a page.
  • Constructor Details

  • Method Details

    • parseTransformations

      public static List<WebResourceTransformation> parseTransformations(com.atlassian.plugin.module.Element element)
      Parse transformations.
    • parseCondition

      public static DecoratingCondition parseCondition(UrlReadingConditionElementParser conditionElementParser, com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element)
    • init

      public void init(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) throws com.atlassian.plugin.PluginParseException
      Specified by:
      init in interface com.atlassian.plugin.ModuleDescriptor<Void>
      Overrides:
      init in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
      Throws:
      com.atlassian.plugin.PluginParseException
    • getModule

      public Void getModule()
      As this descriptor just handles resources, you should never call this
      Specified by:
      getModule in interface com.atlassian.plugin.ModuleDescriptor<Void>
      Specified by:
      getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
    • enabled

      public void enabled()
      Specified by:
      enabled in interface com.atlassian.plugin.StateAware
      Overrides:
      enabled in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
    • disabled

      public void disabled()
      Specified by:
      disabled in interface com.atlassian.plugin.StateAware
      Overrides:
      disabled in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
    • isDeprecated

      public boolean isDeprecated()
      Specified by:
      isDeprecated in interface WebResourceModuleDescriptor
    • getDeprecation

      public Deprecation getDeprecation()
    • getContexts

      public Set<String> getContexts()
      Returns the web resource contexts this resource is associated with.
      Specified by:
      getContexts in interface WebResourceModuleDescriptor
      Returns:
      the web resource contexts this resource is associated with.
      Since:
      2.5.0
    • getDependencies

      public List<String> getDependencies()
      Returns a list of dependencies on other web resources.
      Specified by:
      getDependencies in interface WebResourceModuleDescriptor
      Returns:
      a list of module complete keys
    • isRootPage

      public boolean isRootPage()
      Returns an Option of the RootPage object.
      Specified by:
      isRootPage in interface WebResourceModuleDescriptor
      Returns:
      an Option of the RootPage object
    • getContextDependencies

      public Set<String> getContextDependencies()
      Returns the set of contexts that this resource depends on.
      Specified by:
      getContextDependencies in interface WebResourceModuleDescriptor
      Returns:
      the set of contexts that this resource depends on
      Since:
      3.5.9
    • getTransformations

      public List<WebResourceTransformation> getTransformations()
    • getCondition

      public DecoratingCondition getCondition()
    • isDisableMinification

      public boolean isDisableMinification()
      Specified by:
      isDisableMinification in interface WebResourceModuleDescriptor
      Returns:
      true if resource minification should be skipped, false otherwise.
    • getDataProviders

      public Map<String,WebResourceDataProvider> getDataProviders()
      Returns:
      data providers specified by this web-resource
      Since:
      3.0