Class to load data from a file into the domain layer. More...
#include <dataloader.h>
Classes | |
struct | TaskData |
Public Member Functions | |
QString | description () const |
QString | name () const |
DataType | dataType () const |
ActionType | actionType () const |
void | init (domain::TaskManagerData *data, ui::UiInterface *ui, ControllerFactory *factory) |
Private Member Functions | |
void | execute () |
bool | userIsValid () const |
bool | load (const QDomElement &root) |
bool | loadProject (const QDomElement &project) |
bool | loadProjects (const QDomElement &projects) |
bool | loadResource (const QDomElement &resource) |
bool | loadResources (const QDomElement &resources) |
bool | loadUser (const QDomElement &user) |
bool | loadTask (const QDomElement &task, domain::User *userPointer) |
bool | loadTasks (const QDomElement &tasks, domain::User *userPointer) |
bool | loadReservations (const QDomElement &reservations, const QString &taskRef) |
bool | loadReservation (const QDomElement &reservation, const QString &taskRef) |
bool | loadInvitations () |
bool | createTasks () |
Private Attributes | |
QMap< QString, TaskData > | taskData |
QMap< QString, domain::Resource * > | resourceRefs |
QMap< QString, domain::Project * > | projectRefs |
QMap< QString, domain::Task * > | taskRefs |
QMap< QString, domain::User * > | userRefs |
QMultiMap< QString, QString > | taskInvitees |
QMultiMap< domain::User *, QMap< QString, QString > > | userInvitees |
ControllerInterface * | themeLoader |
Class to load data from a file into the domain layer.
This class can be used by an interface to populate a TaskManagerData. The file used for this should be conform with the following schema: "http:// www.cs.kuleuven.be/mop http://www.cs.kuleuven.be/~thomash/mop_iteratie1.xsd". If the specied file does not completely follows this shema, the result of execute() will leave the domain layer in consistent state. However, it is possible thad only a part of the file is added to TaskManagerData.
Definition at line 37 of file dataloader.h.
ControllerInterface::ActionType DataLoader::actionType | ( | ) | const [virtual] |
Returns the action type of the controller
Implements control::ControllerInterface.
Definition at line 40 of file dataloader.cpp.
ControllerInterface::DataType DataLoader::dataType | ( | ) | const [virtual] |
Returns the data type on which the controller acts
Implements control::ControllerInterface.
Definition at line 35 of file dataloader.cpp.
QString DataLoader::description | ( | ) | const [virtual] |
Returns the description of the controller
Implements control::ControllerInterface.
Definition at line 25 of file dataloader.cpp.
void DataLoader::execute | ( | ) | [private, virtual] |
Executes a whole use case
Implements control::ControllerInterface.
Definition at line 61 of file dataloader.cpp.
void DataLoader::init | ( | domain::TaskManagerData * | data, | |
ui::UiInterface * | ui, | |||
ControllerFactory * | factory | |||
) | [virtual] |
Initiates the controller with a pointer to a TaskManagerData object, a user interface and a controller factory
data | Pointer to TaskManagerData object | |
ui | Pointer to a user interface | |
factory | Pointer to a controller factory |
Reimplemented from control::ControllerInterface.
Definition at line 45 of file dataloader.cpp.
QString DataLoader::name | ( | ) | const [virtual] |
Returns the name of the controller
Implements control::ControllerInterface.
Definition at line 30 of file dataloader.cpp.