|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.Resources
public class Resources
An aggregate of all resource descriptors within the given plugin module or plugin.
AbstractPlugin.resources,
AbstractModuleDescriptor.resources| Nested Class Summary | |
|---|---|
static class |
Resources.TypeFilter
|
| Field Summary | |
|---|---|
static Resources |
EMPTY_RESOURCES
|
| Constructor Summary | |
|---|---|
Resources(java.lang.Iterable<ResourceDescriptor> resourceDescriptors)
Deprecated. Since 3.0.1, use fromXml(org.dom4j.Element) instead. This will lazily create the
ResourceDescriptors from the Element, for a memory saving. |
|
| Method Summary | |
|---|---|
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(java.lang.String type,
java.lang.String name)
Get a ResourceDescriptor of a particular type and name. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors()
Get a List of all the descriptors
. |
java.util.List<ResourceDescriptor> |
getResourceDescriptors(java.lang.String type)
Deprecated. |
ResourceLocation |
getResourceLocation(java.lang.String type,
java.lang.String name)
Get a ResourceLocation of a particular type and name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Resources EMPTY_RESOURCES
| Constructor Detail |
|---|
@Deprecated
public Resources(java.lang.Iterable<ResourceDescriptor> resourceDescriptors)
throws java.lang.IllegalArgumentException
fromXml(org.dom4j.Element) instead. This will lazily create the
ResourceDescriptors from the Element, for a memory saving.
resourceDescriptors - the descriptors which are part of this
resources object
java.lang.IllegalArgumentException - if the resourceDescriptors list is null| Method Detail |
|---|
public static Resources fromXml(org.dom4j.Element element)
throws PluginParseException,
java.lang.IllegalArgumentException
element - the plugin or plugin module XML fragment which should not
be null
PluginParseException - if there are two resources with the same
name and type in this element, or another parse error occurs
java.lang.IllegalArgumentException - if the provided element is nullpublic java.util.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 Resourced@Deprecated public java.util.List<ResourceDescriptor> getResourceDescriptors(java.lang.String type)
getResourceDescriptors() and
filter as required
getResourceDescriptors in interface Resourced
public ResourceLocation getResourceLocation(java.lang.String type,
java.lang.String name)
ResourcedResourceLocation of a particular type and name.
getResourceLocation in interface Resourced
public ResourceDescriptor getResourceDescriptor(java.lang.String type,
java.lang.String name)
ResourcedResourceDescriptor of a particular type and name.
getResourceDescriptor in interface Resourced
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||