public interface HistoryService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CACHE_ENABLED_PROPERTY
Property and values used to be set in configuration
Used in implementation to cache every opened history document
or not to cache them and to access them on every read
|
static java.lang.String |
DATE_FORMAT
Date format used in the XML history database.
|
Modifier and Type | Method and Description |
---|---|
History |
createHistory(HistoryID id,
HistoryRecordStructure recordStructure)
Creates a new history for this ID.
|
java.util.List<HistoryID> |
getExistingHistories(java.lang.String[] rawid)
Enumerates existing histories.
|
java.util.Iterator<HistoryID> |
getExistingIDs()
Returns the IDs of all existing histories.
|
History |
getHistory(HistoryID id)
Returns the history associated with this ID.
|
boolean |
isHistoryCreated(HistoryID id)
Checks whether a history is created and stored.
|
boolean |
isHistoryExisting(HistoryID id)
Tests if a history with the given ID exists and is loaded.
|
void |
moveHistory(HistoryID oldId,
HistoryID newId)
Moves the content of oldId history to the content of the newId.
|
void |
purgeLocallyCachedHistories()
Clears locally(in memory) cached histories.
|
void |
purgeLocallyStoredHistory(HistoryID id)
Permanently removes local stored History
|
static final java.lang.String CACHE_ENABLED_PROPERTY
static final java.lang.String DATE_FORMAT
java.util.Iterator<HistoryID> getExistingIDs()
History getHistory(HistoryID id) throws java.lang.IllegalArgumentException
id
- The ID of the history.java.lang.IllegalArgumentException
- Thrown if there is no such history.java.util.List<HistoryID> getExistingHistories(java.lang.String[] rawid) throws java.lang.IllegalArgumentException
rawid
- the start of the HistoryID of all the histories that will be
returned.java.lang.IllegalArgumentException
- if the rawid contains ids
which are missing in current history.boolean isHistoryExisting(HistoryID id)
id
- The ID to test.History createHistory(HistoryID id, HistoryRecordStructure recordStructure) throws java.lang.IllegalArgumentException, java.io.IOException
id
- The ID of the history to be created.recordStructure
- The structure of the data.java.lang.IllegalArgumentException
- Thrown if such history already exists.java.io.IOException
- Thrown if the history could not be created due to a IO error.void purgeLocallyStoredHistory(HistoryID id) throws java.io.IOException
id
- HistoryIDjava.io.IOException
- Thrown if the history could not be removed due to a IO error.void purgeLocallyCachedHistories()
void moveHistory(HistoryID oldId, HistoryID newId) throws java.io.IOException
oldId
- id of the old and existing historynewId
- the place where content of oldId will be movedjava.io.IOException
- problem moving content to newId.boolean isHistoryCreated(HistoryID id)
id
- the history to check
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.