View Javadoc

1   package com.atlassian.marketplace.client.model;
2   
3   import com.atlassian.fugue.Option;
4   
5   import com.google.common.collect.ImmutableList;
6   
7   /**
8    * A more concise representation of an {@link Addon} when it is embedded in another response.
9    * @since 2.0.0
10   */
11  public class AddonSummary extends AddonBase
12  {
13      Embedded _embedded;
14  
15      @Override
16      public Iterable<AddonCategorySummary> getCategories()
17      {
18          return _embedded.categories;
19      }
20  
21      @Override
22      public AddonDistributionSummary getDistribution()
23      {
24          return _embedded.distribution;
25      }
26  
27      @Override
28      public Option<ImageInfo> getLogo()
29      {
30          return _embedded.logo;
31      }
32      
33      @Override
34      public AddonReviewsSummary getReviews()
35      {
36          return _embedded.reviews;
37      }
38  
39      @Override
40      public Option<VendorSummary> getVendor()
41      {
42          return _embedded.vendor;
43      }
44  
45      /**
46       * Details of one of the add-on's versions. This will be present if you have requested
47       * it in an add-on query (see {@link com.atlassian.marketplace.client.api.AddonQuery.Builder#withVersion(boolean)}),
48       * in which case it will be the latest available version that matches whatever criteria you have specified.
49       */
50      public Option<AddonVersionSummary> getVersion()
51      {
52          return _embedded.version;
53      }
54  
55      static final class Embedded
56      {
57          ImmutableList<AddonCategorySummary> categories;
58          AddonDistributionSummary distribution;
59          Option<ImageInfo> logo;
60          AddonReviewsSummary reviews;
61          Option<VendorSummary> vendor;
62          Option<AddonVersionSummary> version;
63      }
64  }