Interface AccessTokenDao

    • Method Detail

      • findByUserName

        @NotNull
        @NotNull List<MutableAccessToken> findByUserName​(String userName)
        Get all user's tokens
        Parameters:
        userName -
        Returns:
        tokens
      • deleteByUserName

        void deleteByUserName​(String userName)
        Delete all user's tokens
        Parameters:
        userName -
      • countByUserName

        long countByUserName​(String userName)
        Parameters:
        userName -
        Returns:
        number of user's tokens
      • tokenWithNameAndUserNameExists

        boolean tokenWithNameAndUserNameExists​(@NotNull
                                               @NotNull String userName,
                                               @NotNull
                                               @NotNull String tokenName)
        Check if user has token with name
        Parameters:
        userName -
        tokenName -
        Returns:
        true if token for user name and token name already exists
      • scrollTokensForExport

        long scrollTokensForExport​(Consumer<MutableAccessToken> exportXmlConsumer)
        Scroll through all AccessToken records and pass them to consumer
      • countTokensWithPermission

        long countTokensWithPermission​(@NotNull
                                       @NotNull AccessTokenPermission accessTokenPermission)
        Count number of access tokens with given permission
        Parameters:
        accessTokenPermission -
        Returns: