View Javadoc

1   package com.atlassian.marketplace.client.model;
2   
3   import java.net.URI;
4   
5   import com.atlassian.fugue.Option;
6   import com.atlassian.marketplace.client.api.ApplicationKey;
7   import com.atlassian.marketplace.client.api.EnumWithKey;
8   
9   /**
10   * Information about an Atlassian application/platform, such as JIRA.
11   * @see com.atlassian.marketplace.client.api.Applications
12   */
13  public class Application implements Entity
14  {
15      Links _links;
16      @RequiredLink(rel = "self") URI selfUri;
17      
18      String name;
19      ApplicationKey key;
20      String introduction;
21      ApplicationStatus status;
22      ConnectSupport atlassianConnectSupport;
23      CompatibilityUpdateMode compatibilityMode;
24      Details details;
25      HostingSupport hostingSupport;
26      @ReadOnly Option<Integer> cloudFreeUsers;
27      
28      // not supported: keyAliases
29  
30      @Override
31      public Links getLinks()
32      {
33          return _links;
34      }
35      
36      @Override
37      public URI getSelfUri()
38      {
39          return selfUri;
40      }
41      
42      /**
43       * The application name.
44       */
45      public String getName()
46      {
47          return name;
48      }
49      
50      /**
51       * The unique string key representing the application.
52       */
53      public ApplicationKey getKey()
54      {
55          return key;
56      }
57  
58      public ApplicationStatus getStatus()
59      {
60          return status;
61      }
62  
63      public String getIntroduction()
64      {
65          return introduction;
66      }
67  
68      public CompatibilityUpdateMode getCompatibilityUpdateMode()
69      {
70          return compatibilityMode;
71      }
72      
73      public String getDescription()
74      {
75          return details.description;
76      }
77      
78      public URI getLearnMoreUri()
79      {
80          return details.learnMore;
81      }
82      
83      public Option<URI> getDownloadPageUri()
84      {
85          return details.downloadPage;
86      }
87      
88      public Option<Integer> getCloudFreeUsers()
89      {
90          return cloudFreeUsers;
91      }
92      
93      /**
94       * Indicates how Marketplace will update add-on compatibilities when a new application version is
95       * released. 
96       */
97      public enum CompatibilityUpdateMode implements EnumWithKey
98      {
99          /**
100          * Indicates that Marketplace will automatically mark an add-on version as compatible
101          * with the next micro/patch release version of an application, if it was compatible
102          * with the previous one (for instance, going from 3.1.2 to 3.1.3). 
103          */
104         MICRO_VERSIONS("micro"),
105         /**
106          * Indicates that Marketplace will automatically mark an add-on version as compatible
107          * with the next minor release version of an application, if it was compatible
108          * with the previous one (for instance, going from 3.1.x to 3.2). 
109          */
110         MINOR_VERSIONS("minor");
111         
112         private String key;
113         
114         private CompatibilityUpdateMode(String key)
115         {
116             this.key = key;
117         }
118         
119         @Override
120         public String getKey()
121         {
122             return key;
123         }
124     }
125     
126     static class ConnectSupport
127     {
128         Boolean cloud;
129         Boolean server;
130     }
131     
132     static class Details
133     {
134         String description;
135         URI learnMore;
136         Option<URI> downloadPage;
137     }
138     
139     static class HostingModelSupport
140     {
141         Boolean enabled;
142         // not supported: customHamsKey
143     }
144     
145     static class HostingSupport
146     {
147         HostingModelSupport cloud;
148         HostingModelSupport server;
149     }
150 }