Skip to content

Commit

Permalink
Merge pull request #6 from bible-game/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jrsmth authored Feb 6, 2025
2 parents f62ba85 + b272f8a commit 582cd28
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
projectName=config
group=game.bible
artifactDescription=The BLE Config Model (config)
version=0.0.3-SNAPSHOT
version=0.1.0-SNAPSHOT
multiModule=false
jiraCode=BLE
51 changes: 33 additions & 18 deletions src/main/kotlin/game/bible/config/model/domain/BibleConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,42 +30,57 @@ class BibleConfig : Initialisable {
private val log: Logger = LoggerFactory.getLogger(BibleConfig::class.java)
}

private val books: List<BibleBookConfig>? = null
private val testaments: List<BibleTestamentConfig>? = null

fun getBooks() = books
fun getTestaments() = testaments
// Note: getter required to proxy fields

@JsonIgnoreProperties(ignoreUnknown = true)
class BibleBookConfig : Serializable {
class BibleTestamentConfig : Serializable {

private val book: String? = null
private val chapters: List<BiblePassageConfig>? = null
private val name: String? = null
private val divisions: List<BibleDivisionConfig>? = null

fun getBook() = book
fun getChapters() = chapters
fun getName() = name
fun getDivisions() = divisions

companion object {
@Serial private val serialVersionUID = 987654321098765432L
@Serial private val serialVersionUID = 10645876543987432L
}

@JsonIgnoreProperties(ignoreUnknown = true)
class BiblePassageConfig : Serializable {
class BibleDivisionConfig : Serializable {

private val chapter: Int? = null
private val title: String? = null
private val verseStart: Int? = null
private val verseEnd: Int? = null
private val name: String? = null
private val books: List<BibleBookConfig>? = null

fun getChapter() = chapter
fun getTitle() = title
fun getVerseStart() = verseStart
fun getVerseEnd() = verseEnd
fun getName() = name
fun getBooks() = books

companion object {
@Serial private val serialVersionUID = 10645876543987432L
@Serial private val serialVersionUID = 7066743554336982L
}

@JsonIgnoreProperties(ignoreUnknown = true)
class BibleBookConfig : Serializable {

private val key: String? = null
private val name: String? = null
private val chapters: Int? = null
private val verses: List<Int>? = null

fun getKey() = key
fun getName() = name
fun getChapters() = chapters
fun getVerses() = verses

companion object {
@Serial private val serialVersionUID = 4706367545394827L
}
}
}
}

}


Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package game.bible.config.model.integration

import game.bible.config.bean.Initialisable
import game.bible.config.bean.Reloadable
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.io.Serial

/**
* ChatGPT Configuration
*
* @author J. R. Smith
* @since 30th January 2025
*/
@Reloadable(
prefix = "chat-gpt",
path = "\${application.config.dir}")
class ChatGptConfig : Initialisable {

init {
log.info("Created [{}]", this.javaClass.name)
}

private val apiKey: String? = null
private val promptDeveloper: String? = null
private val promptUser: String? = null

fun getApiKey() = apiKey
fun getPromptDeveloper() = promptDeveloper
fun getPromptUser() = promptUser
// Note: this getter is required or proxying this field fails

companion object {
@Serial private val serialVersionUID = 3578565273432319L

private val log: Logger = LoggerFactory.getLogger(ChatGptConfig::class.java)
}

}

0 comments on commit 582cd28

Please sign in to comment.