View Javadoc

1   package com.atlassian.marketplace.client.api;
2   
3   /**
4    * Represents the available types of vendor-specified external links for add-on versions.
5    * Deprecated types are available only for some old add-on listings and cannot be set for new ones.
6    * @since 2.0.0
7    */
8   public enum AddonVersionExternalLinkType
9   {
10      /**
11       * A link to a downloadable file for the add-on, if it is not hosted on the Marketplace server
12       * (for add-ons that are not directly installable).
13       */
14      BINARY("binary", true),
15      
16      /**
17       * A link to online documentation.
18       */
19      DOCUMENTATION("documentation", true),
20      
21      /**
22       * A link to a web page for donating to the vendor.
23       * @deprecated This link cannot be set for new add-on versions, but may be present in old versions.
24       */
25      @Deprecated
26      DONATE("donate", false),
27      
28      /**
29       * A link to an end-user license agreement.
30       */
31      EULA("eula", true),
32      
33      /**
34       * A link to a page for obtaining evaluation licenses.
35       * @deprecated This link cannot be set for new add-on versions, but may be present in old versions.
36       */
37      @Deprecated
38      EVALUATION_LICENSE("evaluationLicense", false),
39      
40      /**
41       * A link to Javadoc API documentation.
42       * @deprecated This link cannot be set for new add-on versions, but may be present in old versions.
43       */
44      @Deprecated
45      JAVADOC("javadocs", false),
46      
47      /**
48       * A link to a "learn more" page.
49       */
50      LEARN_MORE("learnMore", true),
51      
52      /**
53       * A link to a web page for licensing details.
54       */
55      LICENSE("license", true),
56      
57      /**
58       * A link to a web page for purchasing the add-on, if it is not paid via Atlassian
59       */
60      PURCHASE("purchase", true),
61      
62      /**
63       * A link to a web page containing release notes.
64       */
65      RELEASE_NOTES("releaseNotes", true),
66      
67      /**
68       * A link to a source control repository.
69       * @deprecated This link cannot be set for new add-on versions, but may be present in old versions.
70       */
71      @Deprecated
72      SOURCE("source", false);
73      
74      private final String key;
75      private final boolean canSetForNewAddonVersions;
76      
77      private AddonVersionExternalLinkType(String key, boolean canSetForNewAddonVersions)
78      {
79          this.key = key;
80          this.canSetForNewAddonVersions = canSetForNewAddonVersions;
81      }
82      
83      /**
84       * Returns true if it is possible to set this type of link for new add-on versions.
85       */
86      public boolean canSetForNewAddonVersions()
87      {
88          return canSetForNewAddonVersions;
89      }
90      
91      /**
92       * The property name that corresponds to this link type within the {@code vendorLinks} or
93       * {@code legacy.vendorLinks} property of the add-on version's JSON representation.
94       */
95      public String getKey()
96      {
97          return key;
98      }
99  }