Package com.atlassian.plugin
Class Resources
java.lang.Object
com.atlassian.plugin.Resources
- All Implemented Interfaces:
Resourced
An aggregate of all resource descriptors within the given plugin module or
plugin.
See resources in com.atlassian.plugin.impl.AbstractPlugin See resources in com.atlassian.plugin.descriptors.AbstractModuleDescriptor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classChecks that theResourceDescriptorhas a matching type, this is determined by comparing theResourceDescriptor.getType()with type supplied to the Constructor of this Predicate. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcesParses the resource descriptors from the provided plugin XML element and creates a Resources object containing them.getResourceDescriptor(String type, String name) Get aResourceDescriptorof a particular type and name.Get aListof all thedescriptors.getResourceLocation(String type, String name) Get aResourceLocationof a particular type and name.
-
Field Details
-
EMPTY_RESOURCES
-
-
Method Details
-
fromXml
Parses the resource descriptors from the provided plugin XML element and creates a Resources object containing them.If the module or plugin contains no resource elements, an empty Resources object will be returned. This method will not return null.
- Parameters:
element- the plugin or plugin module XML fragment which should not be null- Returns:
- a Resources object representing the resources in the plugin or plugin module
- Throws:
PluginParseException- if there are two resources with the same name and type in this element, or another parse error occursIllegalArgumentException- if the provided element is null
-
getResourceDescriptors
Description copied from interface:ResourcedGet aListof all thedescriptors.Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
- Specified by:
getResourceDescriptorsin interfaceResourced- Returns:
- all resource descriptors this object supports.
-
getResourceLocation
Description copied from interface:ResourcedGet aResourceLocationof a particular type and name.- Specified by:
getResourceLocationin interfaceResourced- Returns:
- the specified resource location if found, null otherwise.
-
getResourceDescriptor
Description copied from interface:ResourcedGet aResourceDescriptorof a particular type and name.- Specified by:
getResourceDescriptorin interfaceResourced- Returns:
- the specified resource descriptor if found, null otherwise.
-