Package ch.nolix.core.license
Klasse LicenseManager
java.lang.Object
ch.nolix.core.license.LicenseManager
A
LicenseManager
contains License
s.- Version:
- 2019-11-16
- Autor:
- Silvan Wyss
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddLicense
(License license) Adds the given license to the currentLicenseManager
.<L extends License>
LicenseManageraddLicense
(Class<L> licenseType) Creates and adds a newLicense
of the given licenseType to the currentLicenseManager
<F extends Feature>
booleancontainsFeature
(Class<F> featureType) <L extends License>
booleancontainsLicense
(Class<L> licenseType) IContainer
<Class<?>> void
removeLicense
(License license) Removes the given license from the currentLicenseManager
.<F extends Feature>
LicenseManagerrequireFeature
(Class<F> featureType) Requires the currentLicenseManager
to contain aFeature
of the given featureType.when
(long value)
-
Konstruktordetails
-
LicenseManager
public LicenseManager()
-
-
Methodendetails
-
addLicense
Creates and adds a newLicense
of the given licenseType to the currentLicenseManager
- Typparameter:
L
- is the given licenseType.- Parameter:
licenseType
-- Gibt zurück:
- the current
LicenseManager
. - 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 the currentLicenseManager
does contain already aLicense
of the given licenseType.
-
addLicense
Adds the given license to the currentLicenseManager
.- Parameter:
license
-- Gibt zurück:
- the current
LicenseManager
. - Löst aus:
ArgumentIsNullException
- if the given license is null.InvalidArgumentException
- if the given license is not activated.InvalidArgumentException
- if the currentLicenseManager
contains already aLicense
of the type the given license is.
-
containsFeature
- Typparameter:
F
- is the given featureType.- Parameter:
featureType
-- Gibt zurück:
- true if the current
LicenseManager
contains aFeature
of the given featureType.
-
containsLicense
- Typparameter:
L
- is the given licenseType.- Parameter:
licenseType
-- Gibt zurück:
- true if the current
LicenseManager
contains aLicense
of the given licenseType.
-
getLicenseTypes
- Gibt zurück:
- the types of the licenses of the current
LicenseManager
.
-
removeLicense
Removes the given license from the currentLicenseManager
.- Parameter:
license
-- Löst aus:
ArgumentDoesNotContainElementException
- if the currentLicenseManager
does not contain the given license.
-
requireFeature
Requires the currentLicenseManager
to contain aFeature
of the given featureType.- Typparameter:
F
- is the given featureType.- Parameter:
featureType
-- Gibt zurück:
- the current
LicenseManager
. - Löst aus:
ArgumentDoesNotHaveAttributeException
- if the currentLicenseManager
does not contain aFeature
of the given featureType.
-
when
- Parameter:
value
-- Gibt zurück:
- a new
LongMediator
for the given value.
-