public interface

PluginLicense

com.atlassian.upm.api.license.entity.PluginLicense

Class Overview

Represents a license for a plugin

Summary

Public Methods
Iterable<Contact> getContacts()
Returns the list of contacts in the Organization for this license
DateTime getCreationDate()
Returns the date the license was created
String getDescription()
Returns a user friendly description of this license
Option<LicenseError> getError()
Returns the error condition, if any, that makes the license unusable.
Option<DateTime> getExpiryDate()
Returns the license expiration date, none() if it does not expire
LicenseType getLicenseType()
Returns the license type.
Option<Integer> getLicenseVersion()
Returns the version of the license (i.e.
Option<DateTime> getMaintenanceExpiryDate()
Returns the expiry date for the maintenance on this license, none() if the maintenance never expires.
Option<Integer> getMaximumNumberOfUsers()
Organization getOrganization()
Returns the organization that bought the license
Option<Partner> getPartner()
Returns the partner associated to this license, none() if none exists
String getPluginKey()
Returns the key of the plugin containing the license
String getPluginName()
Returns the human-readable name of the plugin to which this license belongs, if the plugin is currently installed.
DateTime getPurchaseDate()
Returns the date the license was purchased
String getRawLicense()
Returns the raw license string.
String getServerId()
Returns the server id associated with this license
Option<String> getSupportEntitlementNumber()
Returns the Support Entitlement Number (SEN), none() if it cannot be found in the license.
Option<Period> getTimeBeforeExpiry()
Returns the amount of time before license expires, none() if the license never expires.
Option<Period> getTimeBeforeMaintenanceExpiry()
Returns the amount of time before the maintenance expires.
boolean isEvaluation()
Returns true<code> if this is an evaluation license, {@code false otherwise.
boolean isMaintenanceExpired()
Returns true if the maintenance expiry date has been passed, false otherwise.
boolean isSubscription()
Returns true if this is a subscription license, false otherwise.
boolean isUnlimitedNumberOfUsers()
Returns true if the license is for unlimited number of users, false otherwise.
boolean isValid()
Returns true if the license currently allows use of the plugin (not expired, correct type, etc.).

Public Methods

public Iterable<Contact> getContacts ()

Returns the list of contacts in the Organization for this license

Returns

public DateTime getCreationDate ()

Returns the date the license was created

Returns
  • the date the license was created

public String getDescription ()

Returns a user friendly description of this license

Returns
  • a user friendly description of this license

public Option<LicenseError> getError ()

Returns the error condition, if any, that makes the license unusable. If isValid() returns true, then this method will return none().

Returns

public Option<DateTime> getExpiryDate ()

Returns the license expiration date, none() if it does not expire

Returns
  • the license expiration date, none() if it does not expire

public LicenseType getLicenseType ()

Returns the license type.

Returns
  • the license type.

public Option<Integer> getLicenseVersion ()

Returns the version of the license (i.e. which encoder was used to encode the license String), none() if none set

Returns
  • the version of the license (i.e. which encoder was used to encode the license String), none() if none set

public Option<DateTime> getMaintenanceExpiryDate ()

Returns the expiry date for the maintenance on this license, none() if the maintenance never expires.

Returns
  • the expiry date for the maintenance on this license, none() if the maintenance never expires.

public Option<Integer> getMaximumNumberOfUsers ()

Returns
  • the maximum number of users allowed for this product instance, or none() if unlimited.

public Organization getOrganization ()

Returns the organization that bought the license

Returns
  • the organization that bought the license

public Option<Partner> getPartner ()

Returns the partner associated to this license, none() if none exists

Returns
  • the partner associated to this license, none() if none exists

public String getPluginKey ()

Returns the key of the plugin containing the license

Returns
  • the key of the plugin containing the license

public String getPluginName ()

Returns the human-readable name of the plugin to which this license belongs, if the plugin is currently installed. If there is no installed plugin whose key matches the license's plugin key, then this method simply returns the key.

Returns
  • the plugin name if available, otherwise the plugin key

public DateTime getPurchaseDate ()

Returns the date the license was purchased

Returns
  • the date the license was purchased

public String getRawLicense ()

Returns the raw license string.

Returns
  • the raw license string.

public String getServerId ()

Returns the server id associated with this license

Returns
  • the server id associated with this license

public Option<String> getSupportEntitlementNumber ()

Returns the Support Entitlement Number (SEN), none() if it cannot be found in the license.

Returns
  • the Support Entitlement Number (SEN), none() if it cannot be found in the license.

public Option<Period> getTimeBeforeExpiry ()

Returns the amount of time before license expires, none() if the license never expires.

Returns
  • the amount of time before license expires, none() if the license never expires.

public Option<Period> getTimeBeforeMaintenanceExpiry ()

Returns the amount of time before the maintenance expires.

Returns
  • the amount of time before maintenance expiry, none() if the maintenance never expires.

public boolean isEvaluation ()

Returns true<code> if this is an evaluation license, {@code false otherwise.

Returns
  • true<code> if this is an evaluation license, {@code false otherwise.

public boolean isMaintenanceExpired ()

Returns true if the maintenance expiry date has been passed, false otherwise.

Returns
  • true if the maintenance expiry date has been passed, false otherwise.

public boolean isSubscription ()

Returns true if this is a subscription license, false otherwise.

Returns
  • true if this is a subscription license, false otherwise.

public boolean isUnlimitedNumberOfUsers ()

Returns true if the license is for unlimited number of users, false otherwise.

Returns
  • true if the license is for unlimited number of users, false otherwise.

public boolean isValid ()

Returns true if the license currently allows use of the plugin (not expired, correct type, etc.). If this is false, getError() will indicate the reason.

Returns
  • true if the license currently allows use of the plugin