Logo Search packages:      
Sourcecode: webissues version File versions  Download package

WebIssues::DataManager Class Reference

#include <datamanager.h>

List of all members.


Detailed Description

Class for storing data retrieved from the Webissues server.

This class stores data tables which reflect the structure of the server's database. It also handles commands for updating the data and notifies about data updates.

Each command updates a logical unit of data. The three global units are users with their membership, types with their attributes and projects with folders. In addition, each folder unit contains issues from that folder and their attribute values. Each issue unit contains a signle issue and its attributes, comments, attachments and history of changes.

Each unit of data is updated independently. The folder and issue units are updated incrementally, i.e. only the changes since the last update are retrieved.

Only a limited number of issue units is stored. The least recently used issues are removed from memory when the limit is exceeded. To prevent an issue from being removed you have to lock it and unlock it when you no longer need it.

Folder units are cached in data files. When the folder is updated for the first time, its previous contents is automatically read from the cache and only the changed issues are retrieved from the server.

The instance of this class is available using the dataManager global variable. It is created and owned by the ConnectionManager.

Definition at line 121 of file datamanager.h.


Public Member Functions

void addObserver (QObject *observer)
const AttachmentsTableattachments () const
const AttributesTableattributes () const
const ChangesTablechanges () const
const CommentsTablecomments () const
 DataManager ()
int findItem (int itemId)
const FoldersTablefolders () const
bool folderUpdateNeeded (int folderId)
const IssuesTableissues () const
bool issueUpdateNeeded (int issueId)
void lockIssue (int issueId)
const MembersTablemembers () const
const ProjectsTableprojects () const
void removeObserver (QObject *observer)
const TypesTabletypes () const
void unlockIssue (int issueId)
CommandupdateFolder (int folderId)
CommandupdateIssue (int issueId)
CommandupdateProjects ()
CommandupdateTypes ()
CommandupdateUsers ()
const UsersTableusers () const
const ValuesTablevalues () const
 ~DataManager ()

Private Slots

void updateFolderReply (const Reply &reply)
void updateIssueReply (const Reply &reply)
void updateProjectsReply (const Reply &reply)
void updateTypesReply (const Reply &reply)
void updateUsersReply (const Reply &reply)

Private Member Functions

void flushIssueCache ()
FolderStatefolderState (int folderId)
IssueStateissueState (int issueId)
void notifyObservers (UpdateEvent::Unit unit, int id=0)
AttachmentRowreadAttachmentRow (const ReplyLine &line)
AttributeRowreadAttributeRow (const ReplyLine &line)
ChangeRowreadChangeRow (const ReplyLine &line)
CommentRowreadCommentRow (const ReplyLine &line)
void readFolderCache (int folderId)
FolderRowreadFolderRow (const ReplyLine &line)
IssueRowreadIssueRow (const ReplyLine &line)
MemberRowreadMemberRow (const ReplyLine &line)
ProjectRowreadProjectRow (const ReplyLine &line)
TypeRowreadTypeRow (const ReplyLine &line)
UserRowreadUserRow (const ReplyLine &line)
ValueRowreadValueRow (const ReplyLine &line)
void saveFolderCache ()
void updateFolderCache (int folderId)
void writeFolderCache (int folderId)

Private Attributes

AttachmentsTable m_attachments
AttributesTable m_attributes
ChangesTable m_changes
CommentsTable m_comments
FoldersTable m_folders
FoldersStateTable m_foldersState
IssuesTable m_issues
IssuesStateTable m_issuesState
MembersTable m_members
QList< QObject * > m_observers
ProjectsTable m_projects
TypesTable m_types
UsersTable m_users
ValuesTable m_values

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index