Class LicenseChecker


  • public class LicenseChecker
    extends Object
    Checks whether the user has accepted the license terms, and if not, presents them to the user (on the CLI) to accept.
    • Constructor Detail

      • LicenseChecker

        @Inject
        public LicenseChecker​(LicenseLocator locator,
                              LicenseLog log,
                              User user,
                              DebugLog debug)
        Constructs the license checker with the given license locator.
        Parameters:
        locator - used to locate required license terms.
        log - the log to use to record license acceptance.
        user - the interface to interact with the current user.
        debug - the debug log.
        Throws:
        NullPointerException - if any of the arguments are null.
        IllegalArgumentException - if the User.getName() is null or empty.
    • Method Detail

      • checkLicenseAcceptance

        public boolean checkLicenseAcceptance()
        Checks whether the user has accepted all required license terms and prompts them to do so via the CLI if not.
        Returns:
        true if the user accepts all license terms, or false otherwise.