View Javadoc

1   package com.atlassian.sal.api.license;
2   
3   import com.atlassian.annotations.PublicApi;
4   
5   import java.util.Collection;
6   import javax.annotation.Nonnull;
7   import javax.annotation.Nullable;
8   
9   /**
10   * This represents an individual license for the host application.
11   *
12   * Note that some licenses can include multiple Products in a single license (eg ELAs - Enterprise License Agreements).
13   * Other times, a platform may have multiple licenses installed at the same time - one for each Product.
14   */
15  @SuppressWarnings ("UnusedDeclaration")
16  @PublicApi
17  public interface MultiProductLicenseDetails extends BaseLicenseDetails
18  {
19      /**
20       * Returns the license details for all products that are included in this license for the current platform.
21       * <p>
22       * eg if this is the JIRA platform, it could return the license details for Service Desk, Software etc.
23       *
24       * @return all individual Product licenses inside this license String.
25       */
26      @Nonnull
27      Collection<ProductLicense> getAllProductLicenses();
28  
29      /**
30       * Returns the individual Product license with the given product key.
31       *
32       * @param productKey the product key.
33       *
34       * @return the individual Product license with the given product key, or null if that product does not exist in this license.
35       */
36      @Nullable
37      ProductLicense getProductLicense(@Nonnull String productKey);
38  }