Class LicenseAuthorizerFactory


  • public class LicenseAuthorizerFactory
    extends Object
    Factory for creating license authorizers.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • and

        public static ILicenseAuthorizer and​(ILicenseAuthorizer... authorizers)
        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

        public static ILicenseAuthorizer and​(ELicenseFeature... features)
        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

        public static ILicenseAuthorizer feature​(ELicenseFeature 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.
      • fromString

        public static ILicenseAuthorizer fromString​(String authorizer)
        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.
      • or

        public static ILicenseAuthorizer or​(ELicenseFeature... features)
        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

        public static ILicenseAuthorizer or​(ILicenseAuthorizer... authorizers)
        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.