1 package com.atlassian.plugin;
2
3 import java.util.List;
4
5 import com.atlassian.plugin.elements.ResourceDescriptor;
6 import com.atlassian.plugin.elements.ResourceLocation;
7
8 public interface Resourced
9 {
10 /**
11 * Get a {@link List} of all the {@link ResourceDescriptor descriptors}
12 * .
13 * <p>
14 * Note: since 2.2 this list must be immutable, previously modifying this
15 * list could modify the underlying list.
16 *
17 * @return all resource descriptors this object supports.
18 */
19 List<ResourceDescriptor> getResourceDescriptors();
20
21 /**
22 * Get a list of all {@link ResourceDescriptor descriptors} of a particular
23 * type.
24 * <p>
25 * Note: since 2.2 this list must be immutable, previously this list was
26 * modifiable but modifications would not be reflected in the underlying
27 * list.
28 *
29 * @return all resource descriptors this object supports.
30 * @deprecated since 2.5.0 use {@link #getResourceDescriptors()} and filter
31 * as required
32 */
33 @Deprecated
34 List<ResourceDescriptor> getResourceDescriptors(String type);
35
36 /**
37 * Get a {@link ResourceDescriptor} of a particular type and name.
38 *
39 * @return the specified resource descriptor if found, null otherwise.
40 */
41 ResourceDescriptor getResourceDescriptor(String type, String name);
42
43 /**
44 * Get a {@link ResourceLocation} of a particular type and name.
45 *
46 * @return the specified resource location if found, null otherwise.
47 */
48 ResourceLocation getResourceLocation(String type, String name);
49 }