View Javadoc

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      /**
11       * Get a list of all the {@link ResourceDescriptor descriptors}.
12       * <p>
13       * Note: since 2.2 this list must be immutable, previously modifying this list could modify
14       * 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 type.
22       * <p>
23       * Note: since 2.2 this list must be immutable, previously this list was modifiable but 
24       * modifications would not be reflected in the underlying list.
25       * 
26       * @return all resource descriptors this object supports.
27       */
28      List<ResourceDescriptor> getResourceDescriptors(String type);
29  
30      /**
31       * Get a {@link ResourceDescriptor} of a particular type and name.
32       * 
33       * @return the specified resource descriptor if found, null otherwise.
34       */
35      ResourceDescriptor getResourceDescriptor(String type, String name);
36  
37      /**
38       * Get a {@link ResourceLocation} of a particular type and name.
39       * 
40       * @return the specified resource location if found, null otherwise.
41       */
42      ResourceLocation getResourceLocation(String type, String name);
43  }