T - The type of the OpenFileState that this class extends.public interface StatefulFileBackedBackend<T extends OpenFileState>
The GNU Lesser General Public License for details.| Modifier and Type | Method and Description |
|---|---|
T |
initState()
Initialises the state required to read from files, specific to each
different backend
|
String |
readRawContent(T state,
Key key) |
void |
setAliasKey(T state,
Key alias,
Key source)
Sets alias for a comment on a verse range I.e.
|
void |
setRawText(T state,
Key key,
String text)
Set the text allotted for the given verse
|
T initState() throws BookException
BookExceptionString readRawContent(T state, Key key) throws BookException, IOException
state - the state object containing all the open random access fileskey - the verse that is soughtBookExceptionIOException - something went wrong when reading the versevoid setRawText(T state, Key key, String text) throws BookException, IOException
state - TODOkey - The key to set text totext - The text to be set for keyBookException - If the data can not be set.IOException - If the module data path could not be created.void setAliasKey(T state, Key alias, Key source) throws IOException
state - the open file statealias - Alias Keysource - Source KeyIOException - Exception when anything goes wrong on writing the alias