001: /***************************************************************
002: * This file is part of the [fleXive](R) project.
003: *
004: * Copyright (c) 1999-2008
005: * UCS - unique computing solutions gmbh (http://www.ucs.at)
006: * All rights reserved
007: *
008: * The [fleXive](R) project is free software; you can redistribute
009: * it and/or modify it under the terms of the GNU General Public
010: * License as published by the Free Software Foundation;
011: * either version 2 of the License, or (at your option) any
012: * later version.
013: *
014: * The GNU General Public License can be found at
015: * http://www.gnu.org/copyleft/gpl.html.
016: * A copy is found in the textfile GPL.txt and important notices to the
017: * license from the author are found in LICENSE.txt distributed with
018: * these libraries.
019: *
020: * This library is distributed in the hope that it will be useful,
021: * but WITHOUT ANY WARRANTY; without even the implied warranty of
022: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
023: * GNU General Public License for more details.
024: *
025: * For further information about UCS - unique computing solutions gmbh,
026: * please see the company website: http://www.ucs.at
027: *
028: * For further information about [fleXive](R), please see the
029: * project website: http://www.flexive.org
030: *
031: *
032: * This copyright notice MUST APPEAR in all copies of the file!
033: ***************************************************************/package com.flexive.shared.workflow;
034:
035: import java.io.Serializable;
036: import java.util.ArrayList;
037: import java.util.List;
038:
039: /**
040: * Editable workflow class.
041: *
042: * @author Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
043: */
044: public class WorkflowEdit extends Workflow implements Serializable {
045: private static final long serialVersionUID = 2063328609325310548L;
046:
047: /**
048: * Copy constructor.
049: * @param workflow the source workflow
050: */
051: public WorkflowEdit(Workflow workflow) {
052: super (workflow.getId(), workflow.getName(), workflow
053: .getDescription(), workflow.getSteps(), workflow
054: .getRoutes());
055: }
056:
057: /**
058: * Default constructor.
059: */
060: public WorkflowEdit() {
061: }
062:
063: /**
064: * Set the workflow ID.
065: * @param id the workflow ID.
066: */
067: public void setId(long id) {
068: this .id = id;
069: }
070:
071: /**
072: * Set the workflow name.
073: * @param name the workflow name.
074: */
075: public void setName(String name) {
076: this .name = name;
077: }
078:
079: /**
080: * Set the workflow description.
081: * @param description the workflow description.
082: */
083: public void setDescription(String description) {
084: this .description = description;
085: }
086:
087: /**
088: * Set the workflow steps.
089: * @param steps the workflow steps.
090: */
091: public void setSteps(List<? extends StepEdit> steps) {
092: List<Step> list = new ArrayList<Step>(steps.size());
093: list.addAll(steps);
094: this .steps = list;
095: }
096:
097: /**
098: * Set the workflow routes.
099: * @param routes the workflow routes.
100: */
101: public void setRoutes(List<? extends Route> routes) {
102: List<Route> list = new ArrayList<Route>(routes.size());
103: list.addAll(routes);
104: this.routes = list;
105: }
106: }
|