Package com.seeq.utilities.license
Class License
java.lang.Object
com.seeq.utilities.license.LicenseEntry
com.seeq.utilities.license.License
Represents an end-user enforceable software license.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The level of the license indicates what features the user is "entitled" to.static enum
User limits change the behavior of the system when there are a certain number of usersNested classes/interfaces inherited from class com.seeq.utilities.license.LicenseEntry
LicenseEntry.Validity
-
Constructor Summary
ConstructorsConstructorDescriptionLicense
(License.Level level, LicenseEntry.Validity validity, int daysToExpiration) Constructor for a new licenseLicense
(String level, LicenseEntry.Validity validity, int daysToExpiration) Constructor for a new license -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFeature
(LicensedFeature feature) Adds a licensed feature to this licensevoid
disableFeature
(LicensedFeature.Feature feature) Disables a licensed feature until the feature is either re-enabled or appserver is restarted.void
enableFeature
(LicensedFeature.Feature feature) Re-enables a previously disabled licensed feature.Returns the name of the company this license is linked to.Returns the contract numberReturns a collection of all licensed features contained in this licensegetLevel()
Returns the level of the current licenseboolean
hasValidFeature
(LicensedFeature.Feature feature) Checks if the current license has a valid licensed featureboolean
hasValidLevel
(License.Level level) Checks if the current level level has a specific valuevoid
setCompanyName
(String companyName) void
setContractNumber
(String contractNumber) void
setUserLimit
(License.Limit field, Long limit) Methods inherited from class com.seeq.utilities.license.LicenseEntry
computeDaysToExpiration, computeValidity, isValid
-
Constructor Details
-
License
Constructor for a new license- Parameters:
level
- The licensed levelvalidity
- The license validitydaysToExpiration
- The number of days to expiration
-
License
Constructor for a new license- Parameters:
level
- The licensed levelvalidity
- The license validitydaysToExpiration
- The number of days to expiration
-
-
Method Details
-
addFeature
Adds a licensed feature to this license- Parameters:
feature
- The feature to be added
-
disableFeature
Disables a licensed feature until the feature is either re-enabled or appserver is restarted. If the feature does not exist or is not licensed, then this will have no effect.- Parameters:
feature
- the feature to disable
-
enableFeature
Re-enables a previously disabled licensed feature. If the feature is not licensed or was never disabled, then this will have no effect.- Parameters:
feature
- the feature to re-enable
-
hasValidLevel
Checks if the current level level has a specific value- Parameters:
level
- The level which is compared with the current license level- Returns:
- true if the current license is valid and its level is equal with the specified level
-
hasValidFeature
Checks if the current license has a valid licensed feature- Parameters:
feature
- The feature to search for- Returns:
- true if the license is valid and it contains a valid feature with the specified value
-
getLevel
Returns the level of the current license- Returns:
- the level of the current license
-
getFeatures
Returns a collection of all licensed features contained in this license- Returns:
- a collection of all licensed features contained in this license
-
getCompanyName
Returns the name of the company this license is linked to.- Returns:
- the company/organization name
-
getContractNumber
Returns the contract number- Returns:
- the contract number
-
setCompanyName
-
setContractNumber
-
getUserLimitWarn
-
getUserLimitRestrict
-
setUserLimit
-