public final class LicenseFeature extends Object
ACTIVATION licenses are simple: they are a signal for end-user application to know whether or not a user with this license can access those features.
CONSUMPTION licenses can define a maximum amount of consumnptions with which the user can access a feature. After the limit has been reached, any check to feature consumption will throw a validation exception. Unlike the License Consumption, the reset and overage features are not currently implemented.
Constructor and Description |
---|
LicenseFeature(Long id,
String code,
String name,
String featureType,
ZonedDateTime expiryDate,
com.google.gson.JsonElement metadata,
Boolean isFloating,
Boolean isFloatingCloud,
Long floatingTimeout,
Long floatingUsers,
int maxConsumption,
Boolean allowUnlimitedConsumptions,
Boolean allowNegativeConsumptions,
int totalConsumptions,
boolean allowOverages,
int maxOverages,
Boolean resetConsumption,
ConsumptionPeriod consumptionPeriod) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Boolean |
getAllowNegativeConsumptions()
Boolean indicating whether to allow negative consumptions.
|
Boolean |
getAllowUnlimitedConsumptions()
Boolean indicating whether to allow unlimited consumptions.
|
String |
getCode()
Unique code of the feature use for reference purposes.
|
ConsumptionPeriod |
getConsumptionPeriod()
ConsumptionPeriod for LicenseType.CONSUMPTION feature type |
ZonedDateTime |
getExpiryDate()
The expiration date of the feature (can be null)
|
String |
getFeatureType()
Type of the feature ("activation" or "consumption"), as explained in the class definition
javadoc.
|
Long |
getFloatingTimeout()
Floating timeout in minutes.
|
Long |
getFloatingUsers()
Used only with floating cloud/on-premises setup.
|
Long |
getId()
Unique id of the feature.
|
Boolean |
getIsFloating()
Boolean indicating if feature is floating feature.
|
Boolean |
getIsFloatingCloud()
Used only with floating cloud setup.
|
int |
getMaxConsumption()
Number of max consumptions.
|
int |
getMaxOverages()
Maximal overages of this feature (uses after consumptions have been used up).
|
com.google.gson.JsonElement |
getMetadata()
JSON metadata of the feature.
|
String |
getName()
Name of the feature use for reference purposes.
|
Boolean |
getResetConsumption()
Settings for features with
LicenseType.CONSUMPTION type. |
int |
getTotalConsumptions()
Number of consumptions currently being used.
|
int |
hashCode() |
boolean |
isAllowOverages()
License feature settings if it allows overages (used in licences with type
LicenseType.CONSUMPTION ) |
boolean |
isConsumptionFeature() |
String |
toString() |
public LicenseFeature(Long id, String code, String name, String featureType, ZonedDateTime expiryDate, com.google.gson.JsonElement metadata, Boolean isFloating, Boolean isFloatingCloud, Long floatingTimeout, Long floatingUsers, int maxConsumption, Boolean allowUnlimitedConsumptions, Boolean allowNegativeConsumptions, int totalConsumptions, boolean allowOverages, int maxOverages, Boolean resetConsumption, ConsumptionPeriod consumptionPeriod)
public boolean isConsumptionFeature()
public Long getId()
public String getCode()
public String getName()
public String getFeatureType()
public ZonedDateTime getExpiryDate()
public com.google.gson.JsonElement getMetadata()
public Boolean getIsFloating()
public Boolean getIsFloatingCloud()
public Long getFloatingTimeout()
public Long getFloatingUsers()
public int getMaxConsumption()
public Boolean getAllowUnlimitedConsumptions()
public Boolean getAllowNegativeConsumptions()
public int getTotalConsumptions()
public boolean isAllowOverages()
LicenseType.CONSUMPTION
)public int getMaxOverages()
LicenseType.CONSUMPTION
public Boolean getResetConsumption()
LicenseType.CONSUMPTION
type. Indicates if consumptions
reset after a defined period. if true, will also have the consumptionPeriod
fieldpublic ConsumptionPeriod getConsumptionPeriod()
ConsumptionPeriod
for LicenseType.CONSUMPTION
feature typeCopyright © 2025 Cense Data Inc.. All rights reserved.