Class UserManagerConfig


  • public class UserManagerConfig
    extends BeanConfig
    User manager configuration. This bean configuration class is used to create user manager objects.

    This configuration is an optional part of the SecurityManager configuration.

    See Also:
    SecurityManagerConfig.getUserManagerConfig()
    • Constructor Detail

      • UserManagerConfig

        public UserManagerConfig​(BeanConfig config)
    • Method Detail

      • getUserManager

        public UserManager getUserManager​(Class<? extends UserManager> assignableFrom,
                                          Class<?>[] parameterTypes,
                                          Object... initArgs)
                                   throws ConfigurationException
        Build a new UserManager instance based on this configuration. Since the initial requirement for the User Management was to allow for implementations that don't store and retrieve user information from repository content, the otherwise used init interface method has intentionally be omitted. This method attempts to retrieve a constructor matching the given parameterTypes and creates an new instance from the initArgs matching the parameterTypes.
        Parameters:
        assignableFrom - An UserManager class from which the configured implementation must be assignable.
        parameterTypes - Array of classes used to lookup the constructor.
        initArgs - The arguments to create the new user manager instance matching the parameterTypes.
        Returns:
        A new instance of UserManager that is assignable from the class passed as assignableFrom.
        Throws:
        ConfigurationException - If the configured user manager implementation is not assignable from the given UserManager class, does not provide a constructor matching parameterTypes or creating the instance fails.