Package com.atlassian.plugin.webresource
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.
-
Field Summary
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources -
Constructor Summary
ConstructorsConstructorDescriptionWebResourceModuleDescriptor(com.atlassian.plugin.hostcontainer.HostContainer hostContainer) Deprecated.WebResourceModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, com.atlassian.plugin.hostcontainer.HostContainer hostContainer) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisabled()voidenabled()Returns the set of contexts that this resource depends on.Returns the web resource contexts this resource is associated with.Returns a list of dependencies on other web resources.As this descriptor just handles resources, you should never call thisvoidinit(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) booleanbooleanbooleanReturns an Option of the RootPage object.static DecoratingConditionparseCondition(UrlReadingConditionElementParser conditionElementParser, com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element) static List<WebResourceTransformation>parseTransformations(com.atlassian.plugin.module.Element element) Parse transformations.Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, loadClass, satisfiesMinJavaVersion, setBroken, setPlugin, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.plugin.ModuleDescriptor
destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getDisplayName, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, satisfiesMinJavaVersion, setBrokenMethods inherited from interface com.atlassian.plugin.Resourced
getResourceDescriptor, getResourceDescriptors, getResourceLocationMethods inherited from interface com.atlassian.plugin.ScopeAware
getScopeKey
-
Constructor Details
-
WebResourceModuleDescriptor
@Deprecated public WebResourceModuleDescriptor(com.atlassian.plugin.hostcontainer.HostContainer hostContainer) Deprecated. -
WebResourceModuleDescriptor
public WebResourceModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory, com.atlassian.plugin.hostcontainer.HostContainer hostContainer)
-
-
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 -
getModule
As this descriptor just handles resources, you should never call this -
enabled
public void enabled()- Specified by:
enabledin interfacecom.atlassian.plugin.StateAware- Overrides:
enabledin classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
-
disabled
public void disabled()- Specified by:
disabledin interfacecom.atlassian.plugin.StateAware- Overrides:
disabledin classcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecatedin interfaceWebResourceModuleDescriptor
-
getDeprecation
-
getContexts
Returns the web resource contexts this resource is associated with.- Specified by:
getContextsin interfaceWebResourceModuleDescriptor- Returns:
- the web resource contexts this resource is associated with.
- Since:
- 2.5.0
-
getDependencies
Returns a list of dependencies on other web resources.- Specified by:
getDependenciesin interfaceWebResourceModuleDescriptor- Returns:
- a list of module complete keys
-
isRootPage
public boolean isRootPage()Returns an Option of the RootPage object.- Specified by:
isRootPagein interfaceWebResourceModuleDescriptor- Returns:
- an Option of the RootPage object
-
getContextDependencies
Returns the set of contexts that this resource depends on.- Specified by:
getContextDependenciesin interfaceWebResourceModuleDescriptor- Returns:
- the set of contexts that this resource depends on
- Since:
- 3.5.9
-
getTransformations
-
getCondition
-
isDisableMinification
public boolean isDisableMinification()- Specified by:
isDisableMinificationin interfaceWebResourceModuleDescriptor- Returns:
trueif resource minification should be skipped,falseotherwise.
-
getDataProviders
- Returns:
- data providers specified by this web-resource
- Since:
- 3.0
-
WebResourceModuleDescriptor(com.atlassian.plugin.module.ModuleFactory, com.atlassian.plugin.hostcontainer.HostContainer)