Modifier and Type | Class and Description |
---|---|
static class |
ApiTokenStats.SingleTokenStats |
Modifier and Type | Method and Description |
---|---|
ApiTokenStats.SingleTokenStats |
findTokenStatsById(String tokenUuid) |
protected static XmlFile |
getConfigFile(File parent) |
static ApiTokenStats |
load(File parent)
Deprecated.
use
load(User) instead
The method will be removed in a later version as it's an internal one |
static ApiTokenStats |
load(User user)
Loads the data from the user folder into the new object.
|
void |
removeAll()
Will trigger the save if there is some modifications
|
void |
removeAllExcept(String tokenUuid) |
void |
removeId(String tokenUuid)
Will trigger the save if there is some modifications
|
void |
save()
Saves the configuration info to the disk.
|
ApiTokenStats.SingleTokenStats |
updateUsageForId(String tokenUuid)
Will trigger the save
|
public void removeId(@NonNull String tokenUuid)
public void removeAll()
public void removeAllExcept(@NonNull String tokenUuid)
@NonNull public ApiTokenStats.SingleTokenStats updateUsageForId(@NonNull String tokenUuid)
@NonNull public ApiTokenStats.SingleTokenStats findTokenStatsById(@NonNull String tokenUuid)
public void save()
@Deprecated @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public static ApiTokenStats load(@CheckForNull File parent)
load(User)
instead
The method will be removed in a later version as it's an internal oneIf the file is not present, a fresh new instance is created.
@NonNull public static ApiTokenStats load(@NonNull User user)
If the folder does not exist yet, a fresh new instance is created.
Copyright © 2004–2022. All rights reserved.