public class Resources extends Object implements Resourced
com.atlassian.plugin.impl.AbstractPlugin#resources,
com.atlassian.plugin.descriptors.AbstractModuleDescriptor#resources| Modifier and Type | Class and Description |
|---|---|
static class |
Resources.TypeFilter
Deprecated.
since 5.6.0, this will be removed in the next major release of Atlassian Plugins
Resources.TypeFilterPredicate |
static class |
Resources.TypeFilterPredicate
Checks that the
ResourceDescriptor has a matching type, this is determined by comparing the ResourceDescriptor.getType()
with type supplied to the Constructor of this Predicate. |
| Modifier and Type | Field and Description |
|---|---|
static Resources |
EMPTY_RESOURCES |
| Modifier and Type | Method and Description |
|---|---|
static Resources |
fromXml(org.dom4j.Element element)
Parses the resource descriptors from the provided plugin XML element and
creates a Resources object containing them.
|
ResourceDescriptor |
getResourceDescriptor(String type,
String name)
Get a
ResourceDescriptor of a particular type and name. |
List<ResourceDescriptor> |
getResourceDescriptors()
Get a
List of all the descriptors
. |
ResourceLocation |
getResourceLocation(String type,
String name)
Get a
ResourceLocation of a particular type and name. |
public static final Resources EMPTY_RESOURCES
public static Resources fromXml(org.dom4j.Element element)
If the module or plugin contains no resource elements, an empty Resources object will be returned. This method will not return null.
element - the plugin or plugin module XML fragment which should not
be nullPluginParseException - if there are two resources with the same
name and type in this element, or another parse error occursIllegalArgumentException - if the provided element is nullpublic List<ResourceDescriptor> getResourceDescriptors()
ResourcedList of all the descriptors
.
Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
getResourceDescriptors in interface Resourcedpublic ResourceLocation getResourceLocation(String type, String name)
ResourcedResourceLocation of a particular type and name.getResourceLocation in interface Resourcedpublic ResourceDescriptor getResourceDescriptor(String type, String name)
ResourcedResourceDescriptor of a particular type and name.getResourceDescriptor in interface ResourcedCopyright © 2024 Atlassian. All rights reserved.