Class LicenseAuthorizerFactory
java.lang.Object
de.xima.fc.license.LicenseAuthorizerFactory
Factory for creating
license authorizers.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionstatic ILicenseAuthorizerand(ILicenseAuthorizer... authorizers) Creates an authorizer that checks if all given authorizers are authorized.static ILicenseAuthorizerand(ELicenseFeature... features) Creates an authorizer that checks if all given features are authorized.static ILicenseAuthorizerfeature(ELicenseFeature feature) Creates an authorizer that checks if the given feature is authorized.static ILicenseAuthorizerfeature(ELicenseFeature feature, boolean defaultIfNotSet) Creates an authorizer that checks if the given feature is authorized.static ILicenseAuthorizerfromString(String authorizer) Creates a license authorizer from the given serialized representation of the authorizer.static ILicenseAuthorizernot(ILicenseAuthorizer authorizer) Creates the negation of the given authorizer.static ILicenseAuthorizeror(ILicenseAuthorizer... authorizers) Creates an authorizer that checks if any of the given authorizers are authorized.static ILicenseAuthorizeror(ELicenseFeature... features) Creates an authorizer that checks if any of the given features are authorized.
-
Method Details
-
and
Creates an authorizer that checks if all given authorizers are authorized.- Parameters:
authorizers- The authorizers to check.- Returns:
- The new authorizer.
- Throws:
IllegalArgumentException- If no authorizers are provided.
-
and
Creates an authorizer that checks if all given features are authorized.- Parameters:
features- The features to check.- Returns:
- The new authorizer.
- Throws:
IllegalArgumentException- If no features are provided.
-
feature
Creates an authorizer that checks if the given feature is authorized.- Parameters:
feature- The feature to check.- Returns:
- The new authorizer.
- Throws:
NullPointerException- If the feature is null.
-
feature
Creates an authorizer that checks if the given feature is authorized.- Parameters:
feature- The feature to check.defaultIfNotSet- The default value if the feature is not set.- Returns:
- The new authorizer.
- Throws:
NullPointerException- If the feature is null.
-
fromString
Creates a license authorizer from the given serialized representation of the authorizer.- Parameters:
authorizer- The serialized representation of the authorizer.- Returns:
- The license authorizer.
- Throws:
IllegalArgumentException- If the authorizer format is unknown or an error occurs while parsing the authorizer.
-
not
Creates the negation of the given authorizer.- Parameters:
authorizer- The authorizer to negate.- Returns:
- The negated authorizer.
- Throws:
NullPointerException- If the authorizer is null.
-
or
Creates an authorizer that checks if any of the given features are authorized.- Parameters:
features- The features to check.- Returns:
- The new authorizer.
- Throws:
IllegalArgumentException- If no features are provided.
-
or
Creates an authorizer that checks if any of the given authorizers are authorized.- Parameters:
authorizers- The authorizers to check.- Returns:
- The new authorizer.
- Throws:
IllegalArgumentException- If no authorizers are provided.
-