Class ProfileAuthorizer<U extends UserProfile>

    • Constructor Detail

      • ProfileAuthorizer

        public ProfileAuthorizer()
    • Method Detail

      • isAllAuthorized

        public boolean isAllAuthorized​(WebContext context,
                                       List<U> profiles)
        If all profiles are authorized.
        Parameters:
        context - the web context
        profiles - the user profiles
        Returns:
        whether all profiles are authorized
      • isAnyAuthorized

        public boolean isAnyAuthorized​(WebContext context,
                                       List<U> profiles)
        If any of the profiles is authorized.
        Parameters:
        context - the web context
        profiles - the user profiles
        Returns:
        whether any of the profiles is authorized
      • isProfileAuthorized

        protected abstract boolean isProfileAuthorized​(WebContext context,
                                                       U profile)
        Whether a specific profile is authorized.
        Parameters:
        context - the web context
        profile - the user profile
        Returns:
        whether a specific profile is authorized
      • handleError

        protected boolean handleError​(WebContext context)
        Handle the error.
        Parameters:
        context - the web context
        Returns:
        false