|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.history.HistoryServiceImpl
public class HistoryServiceImpl
| Field Summary | |
|---|---|
static String |
DATA_DIRECTORY
The data directory. |
static String |
DATA_FILE
The data file. |
| Fields inherited from interface net.java.sip.communicator.service.history.HistoryService |
|---|
CACHE_ENABLED_PROPERTY |
| Constructor Summary | |
|---|---|
HistoryServiceImpl(org.osgi.framework.BundleContext bundleContext)
Constructor. |
|
| Method Summary | |
|---|---|
History |
createHistory(HistoryID id,
HistoryRecordStructure recordStructure)
Creates a new history for this ID. |
protected DocumentBuilder |
getDocumentBuilder()
|
Iterator<HistoryID> |
getExistingIDs()
Returns the IDs of all existing histories. |
protected FileAccessService |
getFileAccessService()
|
History |
getHistory(HistoryID id)
Returns the history associated with this ID. |
protected boolean |
isCacheEnabled()
Returns whether caching of readed documents is enabled or desibled. |
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. |
protected Document |
parse(ByteArrayInputStream in)
Parse documents. |
protected Document |
parse(File file)
Parse documents. |
void |
purgeLocallyStoredHistory(HistoryID id)
Permamently removes local stored History |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DATA_DIRECTORY
public static final String DATA_FILE
| Constructor Detail |
|---|
public HistoryServiceImpl(org.osgi.framework.BundleContext bundleContext)
throws Exception
bundleContext - OSGi bundle context
Exception - if something went wrong during initialization| Method Detail |
|---|
public Iterator<HistoryID> getExistingIDs()
HistoryService
getExistingIDs in interface HistoryServicepublic boolean isHistoryExisting(HistoryID id)
HistoryService
isHistoryExisting in interface HistoryServiceid - The ID to test.
public History getHistory(HistoryID id)
throws IllegalArgumentException
HistoryService
getHistory in interface HistoryServiceid - The ID of the history.
IllegalArgumentException - Thrown if there is no such history.
public History createHistory(HistoryID id,
HistoryRecordStructure recordStructure)
throws IllegalArgumentException,
IOException
HistoryService
createHistory in interface HistoryServiceid - The ID of the history to be created.recordStructure - The structure of the data.
IllegalArgumentException - Thrown if such history already exists.
IOException - Thrown if the history could not be created due to a IO error.protected FileAccessService getFileAccessService()
protected DocumentBuilder getDocumentBuilder()
protected Document parse(File file)
throws SAXException,
IOException
file - File the file to parse
SAXException - exception
IOException - exception
protected Document parse(ByteArrayInputStream in)
throws SAXException,
IOException
in - ByteArrayInputStream the stream to parse
SAXException - exception
IOException - exceptionprotected boolean isCacheEnabled()
public void purgeLocallyStoredHistory(HistoryID id)
throws IOException
purgeLocallyStoredHistory in interface HistoryServiceid - HistoryID
IOException
public void moveHistory(HistoryID oldId,
HistoryID newId)
throws IOException
moveHistory in interface HistoryServiceoldId - old and existing historynewId - the place where content of oldId will be moved
IOException - problem moving to newIdpublic boolean isHistoryCreated(HistoryID id)
isHistoryCreated in interface HistoryServiceid - the history to check
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||