Public Member Functions | |
tmozIDocumentRepositoryLock | lockRepository () |
Lock repository. | |
nsISimpleEnumerator | createDocumentIterator (in tmozIDocumentRepositoryLock lock) |
Create document iterator. | |
void | destroyDocumentIterator (in tmozIDocumentRepositoryLock lock, in nsISimpleEnumerator iter) |
Destroy document iterator. | |
tmozIDocument | createDocument (in tmozIDocumentRepositoryLock lock, in AString docType) |
Create document in repository. | |
boolean | removeDocument (in tmozIDocumentRepositoryLock lock, in tmozIDocument document) |
Remove document from the repository. | |
Public Attributes | |
readonly attribute tmozIDocumentTypes | documentTypes |
Document types manager. | |
readonly attribute tmozIPresentationManager | presentationManager |
Presentation manager. |
Object provides access to the document repository. It is possible to iterate over stored documents, remove them, etc.
Pseudo code to access repository:
var reposComp = this.domain.componentManager.get("Core.Repository");;
var rqs = reposComp.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var repos = rqs.getInterface(Components.interfaces.tmozIDocumentRepository);
tmozIDocument createDocument | ( | in tmozIDocumentRepositoryLock | lock, | |
in AString | docType | |||
) |
Create document in repository.
document | Created document |
nsISimpleEnumerator createDocumentIterator | ( | in tmozIDocumentRepositoryLock | lock | ) |
Create document iterator.
Iterator allows to iterate over all documents in the repository. Iterator should be closed using destroyDocumentIterator.
lock | Current repository lock |
void destroyDocumentIterator | ( | in tmozIDocumentRepositoryLock | lock, | |
in nsISimpleEnumerator | iter | |||
) |
Destroy document iterator.
Function invalidates document iterator.
lock | Current repository lock | |
iter | Iterator to be invalidated. |
tmozIDocumentRepositoryLock lockRepository | ( | ) |
Lock repository.
Method lock repository. It returns newly created lock. To unlock repository returned object have to be destroyed or method unlock() can be called.
boolean removeDocument | ( | in tmozIDocumentRepositoryLock | lock, | |
in tmozIDocument | document | |||
) |
Remove document from the repository.
Function remove document from the repository.
lock | Current repository lock | |
document | Document to be removed. |
readonly attribute tmozIDocumentTypes documentTypes |
Document types manager.
Manager of document types
readonly attribute tmozIPresentationManager presentationManager |
Presentation manager.
Presentation manager can be used to enumerate all available presentations, add or remove presentation.