Package ch.nolix.core.misc.license
Klasse LicenseManager
java.lang.Object
ch.nolix.core.misc.license.LicenseManager
Of the
LicenseManager an instance cannot be created.- Version:
- 2019-11-16
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidaddLicense(License license) Adds the given license to theLicenseManager.static <L extends License>
voidaddLicense(Class<L> licenseType) Creates and adds a newLicenseof the given licenseType to theLicenseManager.static voidremoveLicense(License license) Removes the given license from theLicenseManager.static <F extends AbstractFeature>
voidrequireFeature(Class<F> featureType) Requires theLicenseManagerto contain aAbstractFeatureof the given featureType.static LongMediatorwhen(long value)
-
Methodendetails
-
addLicense
Adds the given license to theLicenseManager.- Parameter:
license-- Löst aus:
ArgumentIsNullException- if the given license is null.InvalidArgumentException- if theLicenseManagercontains already aLicenseof the type the given license is.
-
addLicense
Creates and adds a newLicenseof the given licenseType to theLicenseManager.- Typparameter:
L- is the given licenseType.- Parameter:
licenseType-- Löst aus:
ArgumentIsNullException- if the given licenseType is null.RuntimeException- if if there was not found a file with the key for a License of the given licenseType.InvalidArgumentException- if the given licenseType does not contain a constructor with 1Stringparameter.InvalidArgumentException- if the found key is not valid.InvalidArgumentException- if theLicenseManagercontains already aLicenseof the given licenseType.
-
requireFeature
Requires theLicenseManagerto contain aAbstractFeatureof the given featureType.- Typparameter:
F- is the given featureType.- Parameter:
featureType-- Löst aus:
ArgumentDoesNotHaveAttributeException- if theLicenseManagerdoes not contain aAbstractFeatureof the given featureType.
-
removeLicense
Removes the given license from theLicenseManager.- Parameter:
license-- Löst aus:
InvalidArgumentException- if theLicenseManagerdoes not contain the given license.
-
when
- Parameter:
value-- Gibt zurück:
- a new
LongMediatorfor the given value.
-