Interface IUserIdentityDao

    • Method Detail

      • getByCallback

        @Nullable
        UserIdentity getByCallback​(IEntityContext ec,
                                   String identifier,
                                   String clientName)
        Finds the user identity by the given callback information. The callback information includes the client name which identifies the SystemAuthenticator or authenticator type and the user identity identifier.
        Parameters:
        ec - Entity context for accessing the database.
        identifier - Identifier of the user identity.
        clientName - Identifies the SystemAuthenticator or authenticator type.
        Returns:
        The user identity matching the callback information.
      • getByUuid

        @Nullable
        UserIdentity getByUuid​(IEntityContext ec,
                               String uuid)
        Finds the user identity with the given UUID.
        Parameters:
        ec - entity context for accessing the database.
        uuid - UUID of the user identity.
        Returns:
        The user identity with the given UUID.
      • getByUuid

        @Nullable
        UserIdentity getByUuid​(IEntityContext ec,
                               UUID uuid)
        Finds the user identity with the given UUID.
        Parameters:
        ec - entity context for accessing the database.
        uuid - of the user identity.
        Returns:
        The user identity with the given UUID.
      • getByClientName

        List<UserIdentity> getByClientName​(IEntityContext ec,
                                           String clientName)
        Returns all user identities that use the client with the provided name.
        Parameters:
        ec - entity context for accessing the database.
        clientName - Name of the security client
        Returns:
        List of all user identities that use the client with the provided name.
      • getExisting

        @Nullable
        UserIdentity getExisting​(IEntityContext ec,
                                 UserIdentity identity)
        Gets another user identity with the same identifier information (client/identifier) if it exists.
        Parameters:
        ec - entity context for accessing the database.
        identity - to check.
        Returns:
        the user identity with the same identifier information (client/identifier) if it exists and null otherwise.
      • isExisting

        boolean isExisting​(IEntityContext ec,
                           UserIdentity identity)
        Checks whether or not another user identity exists with the same identifier information (client/identifier).
        Parameters:
        ec - entity context for accessing the database.
        identity - to check.
        Returns:
        true if there exists another user identity with the same identifier information (client/identifier) and false otherwise.
      • assertUserIdentity

        void assertUserIdentity​(IEntityContext ec,
                                UserIdentity identity)
        Checks if the user identity can be persisted (create/update). If the state of the user identity does not allow persisting than a DatabaseAccessException will be thrown.
        Parameters:
        ec - entity context for accessing the database.
        identity - to check.
        Throws:
        de.xima.cmn.dao.exceptions.DatabaseAccessException - if the user identity can't be persisted.