Class License.PluginLicense
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.License.PluginLicense
-
- Enclosing class:
- License
public static final class License.PluginLicense extends java.lang.Object
Represents the properties of a license which is used to activate a "pay-for" plugin or feature. A license is checked by callingLicense.isPluginLicenseActive(GeneiousPlugin, com.biomatters.geneious.publicapi.plugin.License.PluginLicense, boolean)
and any licenses checked via this method must also be returned by the plugin fromGeneiousPlugin.getPluginLicenses()
- Since:
- API 4.40 (Geneious 5.4)
-
-
Constructor Summary
Constructors Constructor Description PluginLicense(java.lang.String key, java.lang.String name, int trialVersion, int trialLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getKey()
java.lang.String
getName()
int
getTrialLength()
int
getTrialVersion()
int
hashCode()
-
-
-
Constructor Detail
-
PluginLicense
public PluginLicense(java.lang.String key, java.lang.String name, int trialVersion, int trialLength)
- Parameters:
key
- Unique key identifying this license. Biomatters must supply this. Must not be null or zero lengthname
- A user-friendly name for the plugin/feature which can be displayed to the user when asking for a license key etc. must not be null or zero lengthtrialVersion
- Version number which is used to determine if a user should be elegible for a new trial when this plugin is updated. This number is recorded when the user starts a trial of the plugin then when the plugin is updated the user is offered a new trial if the new value is greater than the recorded one. The actual number is not important. Must not be Integer.MIN_VALUE, this is reservedtrialLength
- Length of trial that this license allows in days, 0 means no trial
-
-
Method Detail
-
getKey
public java.lang.String getKey()
- Returns:
- a unique key identifying this license.
-
getName
public java.lang.String getName()
- Returns:
- A user-friendly name for the plugin or feature which can be displayed to the user when asking for a license key etc.
-
getTrialVersion
public int getTrialVersion()
- Returns:
- Version number which is used to determine if a user should be elegible for a new trial when this plugin is updated.
-
getTrialLength
public int getTrialLength()
- Returns:
- Length of trial that this license allows in days, 0 means no trial
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-