Interface AccessTokenDao

All Superinterfaces:
BambooObjectDao<MutableAccessToken>
All Known Implementing Classes:
HibernateAccessTokenDao

@Internal public interface AccessTokenDao extends BambooObjectDao<MutableAccessToken>
DAO for AccessToken objects. No Permission checking in DAO
Since:
6.10
  • Method Details

    • findByTokenId

      @NotNull @NotNull Optional<MutableAccessToken> findByTokenId(String tokenId)
      Parameters:
      tokenId -
      Returns:
      Optional with token if exists, otherwise Optional.empty()
    • 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: