View Javadoc

1   package com.atlassian.marketplace.client.api;
2   
3   /**
4    * Represents the available types of vendor-specified external links for add-ons.
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 AddonExternalLinkType
9   {
10      /**
11       * A link to a continuous integration server/build system.
12       * @deprecated This link cannot be set for new add-on listings, but may be present in old listings.
13       */
14      @Deprecated
15      BUILDS("builds", false),
16      
17      /**
18       * A link to a discussion forum.
19       */
20      FORUMS("forums", true),
21      
22      /**
23       * A link to an issue tracker.
24       */
25      ISSUE_TRACKER("issueTracker", true),
26      
27      /**
28       * A link to a privacy policy. This is required for all Atlassian Connect add-ons.
29       */
30      PRIVACY("privacy", true),
31      
32      /**
33       * A link to a source control repository.
34       * @deprecated This link cannot be set for new add-on listings, but may be present in old listings.
35       */
36      @Deprecated
37      SOURCE("source", false),
38      
39      /**
40       * A link to a wiki.
41       * @deprecated This link cannot be set for new add-on listings, but may be present in old listings.
42       */
43      @Deprecated
44      WIKI("wiki", false);
45      
46      private final String key;
47      private final boolean canSetForNewAddons;
48      
49      private AddonExternalLinkType(String key, boolean canSetForNewAddons)
50      {
51          this.key = key;
52          this.canSetForNewAddons = canSetForNewAddons;
53      }
54      
55      /**
56       * Returns true if it is possible to set this type of link for new add-on listings.
57       */
58      public boolean canSetForNewAddons()
59      {
60          return canSetForNewAddons;
61      }
62      
63      /**
64       * The property name that corresponds to this link type within the {@code vendorLinks} or
65       * {@code legacy.vendorLinks} property of the add-on's JSON representation.
66       */
67      public String getKey()
68      {
69          return key;
70      }
71  }