Class ConfigManager
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.ConfigManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigManageractive()Returns a reference to the active config manager which is mounted to the current active profilestatic Stringstatic voidstatic voidstatic ConfigManagerbackup()Returns a reference to config manager which contains the backup configs and is mounted onto the ./OneConfig/backup directory
internal use only
used for the restore to default buttonsstatic voidcloneProfile(String profile, String newProfile) static org.polyfrost.oneconfig.api.config.v1.Treestatic ConfigManagercore()Returns a reference to the core config manager which is mounted onto the ./config directory
internal use onlystatic voidcreateProfile(String profile) booleanstatic voiddeleteProfile(String profile) static voiddispatchAndWait(Consumer<Runnable> dispatcher, Runnable action, long fallbackNanos, String what) static voidexportProfile(String profile, Path destination) Collection<org.polyfrost.oneconfig.api.config.v1.Tree> org.polyfrost.oneconfig.api.config.v1.Treeorg.polyfrost.oneconfig.api.config.v1.Treestatic voidstatic ConfigManagerinternal()Returns a reference to the internal config manager which is mounted onto the ./OneConfig directorystatic booleanisFavoriteProfile(String profile) static booleanstatic boolean@Nullable org.polyfrost.oneconfig.api.config.v1.Treestatic voidopenProfile(String profile) static PathprofileDir(String profile) static StringprofileIcon(String profile) profiles()static booleanorg.polyfrost.oneconfig.api.config.v1.Treeorg.polyfrost.oneconfig.api.config.v1.backend.Backend.RegistrationResultregister(org.polyfrost.oneconfig.api.config.v1.Tree t) static voidregisterCollector(org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector collector) Register a collector that can be used to collect trees from objects
These are shared between all config managersstatic voidstatic voidrenameProfile(String profile, String newProfile) booleanbooleansave(org.polyfrost.oneconfig.api.config.v1.Tree t) voidsaveAll()static voidsetFavoriteProfile(String profile, boolean favorite) static voidsetProfileIcon(String profile, @Nullable String icon) static voidsetProfileSpecificControls(boolean enabled) static voidsubmitForInitialization(Config config) @UnmodifiableView Collection<org.polyfrost.oneconfig.api.config.v1.Tree> trees()org.polyfrost.oneconfig.api.config.v1.Treeunregister(String id) Stops tracking a tree without deleting its file, so it can be rebound to a new owner.
-
Field Details
-
PROFILES_DIR
-
PROFILE_LOCAL_METADATA
- See Also:
-
-
Method Details
-
addProfileChangeListener
-
addTreeRegistrationListener
@Internal public static void addTreeRegistrationListener(ConfigManager.TreeRegistrationListener listener) -
removeProfileChangeListener
-
profileDir
-
internal
Returns a reference to the internal config manager which is mounted onto the ./OneConfig directory -
backup
Returns a reference to config manager which contains the backup configs and is mounted onto the ./OneConfig/backup directory
internal use only
used for the restore to default buttons -
active
Returns a reference to the active config manager which is mounted to the current active profile -
initialize
@Internal public static void initialize() -
submitForInitialization
-
isRebindingProfiles
@Internal public static boolean isRebindingProfiles() -
openProfile
-
activeProfile
-
profiles
-
createProfile
-
cloneProfile
-
renameProfile
-
deleteProfile
-
exportProfile
-
favoriteProfiles
-
isFavoriteProfile
-
setFavoriteProfile
-
profileIcons
-
profileIcon
-
setProfileIcon
-
profileSpecificControls
public static boolean profileSpecificControls() -
setProfileSpecificControls
public static void setProfileSpecificControls(boolean enabled) -
dispatchAndWait
-
isFirstRun
public static boolean isFirstRun() -
core
Returns a reference to the core config manager which is mounted onto the ./config directory
internal use only -
collect
-
registerCollector
public static void registerCollector(org.polyfrost.oneconfig.api.config.v1.collect.PropertyCollector collector) Register a collector that can be used to collect trees from objects
These are shared between all config managers -
trees
-
load
-
get
-
getNoRegister
- Throws:
Exception
-
save
-
save
public boolean save(org.polyfrost.oneconfig.api.config.v1.Tree t) -
saveAll
public void saveAll() -
getFolder
-
register
public org.polyfrost.oneconfig.api.config.v1.backend.Backend.RegistrationResult register(org.polyfrost.oneconfig.api.config.v1.Tree t) -
delete
-
unregister
Stops tracking a tree without deleting its file, so it can be rebound to a new owner. -
gatherAll
-
register
-