Class Persistence
java.lang.Object
com.cloudbees.jenkins.support.util.Persistence
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class Persistence
extends Object
Utility methods for persisting non-Describable classes.
- Since:
- TODO
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetConfigFile
(Class<T> clazz) static <T extends Saveable>
TLoads a Saveable object from its default location or returnsnull
when the file doesn't exist.static <T extends Saveable>
voidsave
(T object) Saves a Saveable object to its default location.
-
Method Details
-
getConfigFile
- Returns:
- the default config file for the given class
-
save
Saves a Saveable object to its default location. This collaborates withBulkChange
.- Throws:
IOException
-
load
Loads a Saveable object from its default location or returnsnull
when the file doesn't exist.- Throws:
IOException
-