Class ClientDescriptorHelper


  • public class ClientDescriptorHelper
    extends Object
    Helper for retrieving client descriptors for a context.
    Since:
    8.0.0
    Author:
    XIMA Media GmbH
    • Method Detail

      • getBackendClientDescriptors

        public static List<IClientDescriptor> getBackendClientDescriptors​(IEntityContext ec)
        Finds all active client descriptors that are configured for the backend in order. Clients with credentials authenticators are at the beginning of the list.
        Parameters:
        ec - entity context for accessing the database.
        Returns:
        ordered list of all active client descriptors configured for the backend.
        Since:
        8.0.0
      • hasLicenseAccess

        public static boolean hasLicenseAccess​(IClientDescriptor clientDescriptor,
                                               Mandant client)
        Checks if the given client descriptor has license access for the given client or for the system if the client is null.
        Parameters:
        clientDescriptor - to check
        client - the client to check the license for, may be null if the system license should be used.
        Returns:
        Whether the license has access for the EAuthClientType of the given IClientDescriptor.
        Since:
        8.4.1
      • isActive

        public static boolean isActive​(IClientDescriptor descriptor)
        Checks if the given client descriptor is active (and valid).
        Parameters:
        descriptor - to check
        Returns:
        true if the descriptor is active and valid#
      • isActiveAndLicensed

        public static boolean isActiveAndLicensed​(IClientDescriptor descriptor,
                                                  Mandant client)
        Checks if the given client descriptor is active (and valid).
        Parameters:
        descriptor - to check
        client - the client to check the license for, may be null if the system license should be used.
        Returns:
        true if the descriptor is active and valid
      • hasAuthenticatorTypeSystemAccess

        public static boolean hasAuthenticatorTypeSystemAccess​(EAuthClientType type,
                                                               IUser user,
                                                               Mandant client)
        Checks if the given user has system access for configuring the given authenticator type.
        Parameters:
        type - of the authenticator to check, null for no specific type.
        user - the user to check, may be null.
        client - the mandant to check, may be null.
        Returns:
        true if the user has access or if type is null.
      • isAuthClientLicensed

        public static boolean isAuthClientLicensed​(EAuthClientType type,
                                                   Mandant client)
        Checks if the given auth client type is licensed for the given client.
        Parameters:
        type - of the authenticator to check, null for no specific type.
        client - the client to check, may be null.
        Returns:
        true if the type is null or if the type is licensed for the given client.