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