Package jenkins.security.apitoken
Class ApiTokenStats
- java.lang.Object
-
- jenkins.security.apitoken.ApiTokenStats
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ApiTokenStats.SingleTokenStats
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ApiTokenStats.SingleTokenStats
findTokenStatsById(String tokenUuid)
protected static XmlFile
getConfigFile(File parent)
static ApiTokenStats
load(User user)
Loads the data from the user folder into the new object.static ApiTokenStats
load(File parent)
Deprecated.useload(User)
instead The method will be removed in a later version as it's an internal onevoid
removeAll()
Will trigger the save if there is some modificationsvoid
removeAllExcept(String tokenUuid)
void
removeId(String tokenUuid)
Will trigger the save if there is some modificationsvoid
save()
Saves the configuration info to the disk.ApiTokenStats.SingleTokenStats
updateUsageForId(String tokenUuid)
Will trigger the save
-
-
-
Method Detail
-
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.
-
load
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public static ApiTokenStats load(@CheckForNull File parent)
Deprecated.useload(User)
instead The method will be removed in a later version as it's an internal oneLoads 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.
-
-