Interface UserKeyStore

All Known Implementing Classes:
MockUserKeyStore, UserKeyStoreImpl

@Internal public interface UserKeyStore
Since:
v6.0
  • Method Details

    • getUsernameForKey

      String getUsernameForKey(String key)
    • getKeyForUsername

      String getKeyForUsername(String username)
    • renameUser

      @Internal void renameUser(String oldUsername, String newUsername)
    • ensureUniqueKeyForNewUser

      @Internal String ensureUniqueKeyForNewUser(String username)
    • getIdForUserKey

      @Internal Long getIdForUserKey(String name)
    • getUserForId

      @Internal Optional<ApplicationUserEntity> getUserForId(Long id)
    • getUserForKey

      @Internal Optional<ApplicationUserEntity> getUserForKey(String key)
    • getUserForUsername

      @Internal Optional<ApplicationUserEntity> getUserForUsername(String username)
    • removeByKey

      @Internal String removeByKey(String key)
      It is dangerous to use this method. In general operation Jira needs to keep the userName -> key mapping around even if the user is deleted. This is so that it can show something in the UI after the user is deleted.

      This method is used by cloud for import where all the users are deleted anyways (see JiraUserServiceImpl).

      Parameters:
      key - the key to remove.
      Returns:
      the name of the user deleted.
    • isSystemKey

      @Internal boolean isSystemKey(@Nonnull String key)
      Returns true if passed key has been generated automatically by Jira.
      Parameters:
      key -
      Returns:
      true if passed key has been generated automatically by Jira, false otherwise.
    • getKeyFromId

      @Internal @Nonnull String getKeyFromId(long id)
      Returns key generated from id.
      Returns:
      key generated from id.
    • getUniqueKeyFromId

      @Internal @Nonnull Optional<String> getUniqueKeyFromId(long id)
      Returns unique key generated from id.
      Parameters:
      id -
      Returns:
      unique key generated from id.
    • getUniqueUsernameFromId

      @Internal @Nonnull Optional<String> getUniqueUsernameFromId(long id)
      Returns unique username generated from id.
      Parameters:
      id -
      Returns:
      unique username generated from id.
    • changeKey

      @Internal void changeKey(String oldUsername, String newUsername)