Class ApiTokenStats

java.lang.Object
jenkins.security.apitoken.ApiTokenStats
All Implemented Interfaces:
Saveable

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ApiTokenStats extends Object implements Saveable
  • Method Details

    • removeId

      public void removeId(@NonNull String tokenUuid)
      Will trigger the save if there is some modifications
    • removeAll

      public void removeAll()
      Will trigger the save if there is some modifications
    • removeAllExcept

      public void removeAllExcept(@NonNull String tokenUuid)
    • updateUsageForId

      @NonNull public ApiTokenStats.SingleTokenStats updateUsageForId(@NonNull String tokenUuid)
      Will trigger the save
    • findTokenStatsById

      @NonNull public ApiTokenStats.SingleTokenStats findTokenStatsById(@NonNull String tokenUuid)
    • save

      public void save()
      Saves the configuration info to the disk.
      Specified by:
      save in interface Saveable
    • load

      @Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public static ApiTokenStats load(@CheckForNull File parent)
      Deprecated.
      use load(User) instead The method will be removed in a later version as it's an internal one
      Loads the data from the disk into the new object.

      If the file is not present, a fresh new instance is created.

    • load

      @NonNull public static ApiTokenStats load(@NonNull User user)
      Loads the data from the user folder into the new object.

      If the folder does not exist yet, a fresh new instance is created.

    • getConfigFile

      @NonNull protected static XmlFile getConfigFile(@NonNull File parent)