From b951d38f345a02f0739bfc71f2b3df2934e0e0f4 Mon Sep 17 00:00:00 2001 From: Alba Carro Date: Fri, 24 Aug 2012 23:54:27 +0200 Subject: [PATCH] Classes for representing import data * ImportData represents the whole project to be imported. * ImportTask represent a single task. FEA: ItEr77S05BasicProjectImport --- .../business/orders/imports/ImportData.java | 43 ++++++++++++++++++ .../business/orders/imports/ImportTask.java | 44 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportData.java create mode 100644 libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportTask.java diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportData.java b/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportData.java new file mode 100644 index 000000000..4a3ca4774 --- /dev/null +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportData.java @@ -0,0 +1,43 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2012 Igalia, S.L. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.libreplan.business.orders.imports; + +import java.util.List; + +/** + * Class that represents no persistent imported data. + * + * At these moment it only represent the tasks and its subtasks. + * + * @author Alba Carro Pérez + * @todo It last relationships. resources, calendars, hours, etc + */ +public class ImportData { + /** + * Name of the project that is going to be imported. + */ + public String name; + + /** + * List of {@link ImportTask} of the project that is going to be imported. + */ + public List tasks; + +} diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportTask.java b/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportTask.java new file mode 100644 index 000000000..21cafa24b --- /dev/null +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/imports/ImportTask.java @@ -0,0 +1,44 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2012 Igalia, S.L. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.libreplan.business.orders.imports; + +import java.util.List; + +/** + * Class that represents no persistent imported tasks.
+ * + * At these moment it only represent the tasks that can have any subtasks. + * + * @author Alba Carro Pérez + * @todo It last hours, resources, relationships, etc. + */ +public class ImportTask { + + /** + * Name of the task + */ + public String name; + + /** + * List of task that are children of this task + */ + public List children; + +}