File tree 1 file changed +48
-0
lines changed
src/main/kotlin/com/mairwunnx/projectessentials/core/configuration 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com.mairwunnx.projectessentials.core.configuration
2
+
3
+ /* *
4
+ * Configuration interface for all configuration
5
+ * in project essentials modules.
6
+ *
7
+ * @param T configuration data class.
8
+ *
9
+ * @since 1.14.4-1.3.0
10
+ */
11
+ interface IConfiguration <T > {
12
+ /* *
13
+ * Configuration instance (must initialized in
14
+ * `load` method).
15
+ *
16
+ * @since 1.14.4-1.3.0
17
+ */
18
+ val configuration: T
19
+
20
+ /* *
21
+ * Path to configuration.
22
+ *
23
+ * @since 1.14.4-1.3.0
24
+ */
25
+ val path: String
26
+
27
+ /* *
28
+ * Load configuration from local storage or memory.
29
+ * Also initializing configuration field.
30
+ *
31
+ * @since 1.14.4-1.3.0
32
+ */
33
+ fun load ()
34
+
35
+ /* *
36
+ * Save configuration to local storage.
37
+ *
38
+ * @since 1.14.4-1.3.0
39
+ */
40
+ fun save ()
41
+
42
+ /* *
43
+ * @return configuration model instance.
44
+ *
45
+ * @since 1.14.4-1.3.0
46
+ */
47
+ fun take (): T
48
+ }
You can’t perform that action at this time.
0 commit comments