Class AbstractRealm

  • Direct Known Subclasses:
    AbstractStatefulRealm

    public abstract class AbstractRealm
    extends Object
    This class contains all abstract methods of a Payara Realm.
    Author:
    Arjan Tijms
    See Also:
    Realm
    • Constructor Detail

      • AbstractRealm

        public AbstractRealm()
    • Method Detail

      • getAuthType

        public abstract String getAuthType()
        Returns a short (preferably less than fifteen characters) description of the kind of authentication which is supported by this realm.
        Returns:
        description of the kind of authentication that is directly supported by this realm.
      • getUserNames

        public abstract Enumeration<String> getUserNames()
                                                  throws BadRealmException
        Returns names of all the users in this particular realm.
        Returns:
        enumeration of user names (strings)
        Throws:
        BadRealmException - if realm data structures are bad
      • getGroupNames

        public abstract Enumeration<String> getGroupNames()
                                                   throws BadRealmException
        Returns names of all the groups in this particular realm.
        Returns:
        enumeration of group names (strings)
        Throws:
        BadRealmException - if realm data structures are bad
      • supportsUserManagement

        public abstract boolean supportsUserManagement()
        Returns:
        true if the realm implementation support User Management (add, update, remove user)
      • updateUser

        public abstract void updateUser​(String name,
                                        String newName,
                                        char[] password,
                                        String[] groups)
                                 throws NoSuchUserException,
                                        BadRealmException,
                                        IASSecurityException
        Update data for an existing user. User must exist.
        Parameters:
        name - Current name of the user to update.
        newName - New name to give this user. It can be the same as the original name. Otherwise it must be a new user name which does not already exist as a user.
        password - Cleartext password for the user. If non-null the user password is changed to this value. If null, the original password is retained.
        groups - Array of groups to which user belongs.
        Throws:
        BadRealmException - If there are problems adding user.
        NoSuchUserException - If user does not exist.
        IASSecurityException
      • refresh

        public abstract void refresh()
                              throws BadRealmException
        Refreshes the realm data so that new users/groups are visible.
        Throws:
        BadRealmException - if realm data structures are bad