01: /*
02: * Wilos Is a cLever process Orchestration Software - http://www.wilos-project.org
03: * Copyright (C) 2006-2007 Paul Sabatier University, IUP ISI (Toulouse, France) <massie@irit.fr>
04: *
05: * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
06: * General Public License as published by the Free Software Foundation; either version 2 of the License,
07: * or (at your option) any later version.
08: *
09: * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
10: * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11: * GNU General Public License for more details.
12: *
13: * You should have received a copy of the GNU General Public License along with this program; if not,
14: * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15: */
16:
17: package wilos.business.webservices.transfertobject;
18:
19: import java.io.Serializable;
20:
21: import wilos.model.spem2.task.TaskDescriptor;
22:
23: /**
24: *
25: * @author toine
26: */
27: public class TaskDescriptorTO extends TaskDescriptor implements
28: Serializable {
29:
30: /**
31: *
32: */
33: private static final long serialVersionUID = -5257048255787493710L;
34:
35: /** Creates a new instance of TaskDescriptorTO */
36: public TaskDescriptorTO() {
37: }
38:
39: public TaskDescriptorTO(TaskDescriptor myTaskDescriptor) {
40: this .setName(myTaskDescriptor.getName());
41: this .setPrefix(myTaskDescriptor.getPrefix());
42: this .setGuid(myTaskDescriptor.getGuid());
43: this .setDescription(myTaskDescriptor.getDescription());
44: this
45: .setPresentationName(myTaskDescriptor
46: .getPresentationName());
47: this .setInsertionOrder(myTaskDescriptor.getInsertionOrder());
48: this .setMainDescription(myTaskDescriptor.getMainDescription());
49: this .setKeyConsiderations(myTaskDescriptor
50: .getKeyConsiderations());
51:
52: if (myTaskDescriptor.getTaskDefinition() != null)
53: this .setTaskDefinition(new TaskDefinitionTO(
54: myTaskDescriptor.getTaskDefinition()));
55: if (this .getTaskDefinition() != null
56: && this .getDescription().length() == 0)
57: this .setDescription(this .getTaskDefinition()
58: .getDescription());
59:
60: /*
61: * for (ConcreteTaskDescriptor ct :
62: * myTaskDescriptor.getConcreteTaskDescriptors()) {
63: * this.addConcreteTaskDescriptor(new ConcreteTaskDescriptorTO(ct)); }
64: */
65:
66: }
67:
68: // TaskDefinition t = new TaskDefinition().
69: // TaskDescriptor t = new TaskDescriptor().get
70:
71: }
|