Package ch.nolix.core.license
Klasse GlobalLicenseManager
java.lang.Object
ch.nolix.core.license.GlobalLicenseManager
Of the
GlobalLicenseManager
an instance cannot be created.- Version:
- 2019-11-16
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic void
addLicense
(License license) Adds the given license to theGlobalLicenseManager
.static <L extends License>
voidaddLicense
(Class<L> licenseType) Creates and adds a newLicense
of the given licenseType to theGlobalLicenseManager
.static void
removeLicense
(License license) Removes the given license from theGlobalLicenseManager
.static <F extends Feature>
voidrequireFeature
(Class<F> featureType) Requires theGlobalLicenseManager
to contain aFeature
of the given featureType.static LongMediator
when
(long value)
-
Methodendetails
-
addLicense
Adds the given license to theGlobalLicenseManager
.- Parameter:
license
-- Löst aus:
ArgumentIsNullException
- if the given license is null.InvalidArgumentException
- if theGlobalLicenseManager
contains already aLicense
of the type the given license is.
-
addLicense
Creates and adds a newLicense
of the given licenseType to theGlobalLicenseManager
.- 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 1String
parameter.InvalidArgumentException
- if the found key is not valid.InvalidArgumentException
- if theGlobalLicenseManager
contains already aLicense
of the given licenseType.
-
requireFeature
Requires theGlobalLicenseManager
to contain aFeature
of the given featureType.- Typparameter:
F
- is the given featureType.- Parameter:
featureType
-- Löst aus:
ArgumentDoesNotHaveAttributeException
- if theGlobalLicenseManager
does not contain aFeature
of the given featureType.
-
removeLicense
Removes the given license from theGlobalLicenseManager
.- Parameter:
license
-- Löst aus:
InvalidArgumentException
- if theGlobalLicenseManager
does not contain the given license.
-
when
- Parameter:
value
-- Gibt zurück:
- a new
LongMediator
for the given value.
-