Package jenkins.security.apitoken
Class ApiTokenStats
- java.lang.Object
-
- jenkins.security.apitoken.ApiTokenStats
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApiTokenStats.SingleTokenStats
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ApiTokenStats.SingleTokenStatsfindTokenStatsById(String tokenUuid)protected static XmlFilegetConfigFile(File parent)static ApiTokenStatsload(User user)Loads the data from the user folder into the new object.static ApiTokenStatsload(File parent)Deprecated.useload(User)instead The method will be removed in a later version as it's an internal onevoidremoveAll()Will trigger the save if there is some modificationsvoidremoveAllExcept(String tokenUuid)voidremoveId(String tokenUuid)Will trigger the save if there is some modificationsvoidsave()Saves the configuration info to the disk.ApiTokenStats.SingleTokenStatsupdateUsageForId(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.
-
-