View Javadoc

1   package com.atlassian.marketplace.client.model;
2   
3   import java.net.URI;
4   
5   import com.atlassian.fugue.Option;
6   
7   /**
8    * Information about an installable file hosted by Marketplace.
9    * @since 2.0.0
10   */
11  public final class ArtifactInfo implements Entity
12  {
13      Links _links;
14      @RequiredLink(rel = "self") URI selfUri;
15      @RequiredLink(rel = "binary") URI binaryUri;
16      
17      /**
18       * The URI from which the actual file can be downloaded. This is different from
19       * {@link #getSelfUri()}, which is the URI of the asset resource (see
20       * {@link com.atlassian.marketplace.client.api.Assets}).
21       */
22      public URI getBinaryUri()
23      {
24          return binaryUri;
25      }
26      
27      @Override
28      public URI getSelfUri()
29      {
30          return selfUri;
31      }
32  
33      /**
34       * The remote URI of the descriptor where it is hosted by its application, if this artifact
35       * is the descriptor of an Atlassian Connect add-on.
36       */
37      public Option<URI> getRemoteDescriptorUri()
38      {
39          return _links.getUri("remote");
40      }
41      
42      @Override
43      public Links getLinks()
44      {
45          return _links;
46      }
47  }