001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: package org.cougaar.planning.ldm.plan;
028:
029: import java.util.Enumeration;
030:
031: /** NewWorkflow extends Workflow with set methods and other methods useful
032: * for building valid objects.
033: **/
034:
035: public interface NewWorkflow extends Workflow {
036:
037: /** setParentTask allows you to set the parent task
038: * or base task of a Worflow.
039: * <PRE> myworkflow.setParentTask(mytask); </PRE>
040: * @param parentTask Should be a Task that is the task that was expanded to create the Workflow.
041: **/
042:
043: void setParentTask(Task parentTask);
044:
045: /** setTasks allows you to pass in the Tasks that were created
046: * during the expansion of the parentTask. These Task objects make up
047: * a Workflow (along with Constraint objects).
048: * <PRE> myworkflow.setTasks(myenumoftasks); </PRE>
049: * @param tasks - Enumeration{Task} tasks that make up the workflow
050: **/
051:
052: void setTasks(Enumeration tasks);
053:
054: /** addTask allows you to add a Task to a Workflow.
055: * <PRE> myworkflow.addTask(mynewtask); </PRE>
056: * @param newTask - Task to add
057: **/
058:
059: void addTask(Task newTask);
060:
061: /** Remove the specified Task from the Workflow's sub-task collection
062: * @param remTask The Task to be removed.
063: **/
064: void removeTask(Task remTask);
065:
066: /** setConstraints allows you to add an Enumeration
067: * of Constraints to a Workflow. Each Constraint has
068: * a relationship with a pair of Tasks in a Workflow.
069: * <PRE> myworkflow.setConstraints(myenumofconstraints);</PRE>
070: * @param enumofConstraints - Enumeration{Constraint} constraints to add to workflow
071: **/
072:
073: void setConstraints(Enumeration enumofConstraints);
074:
075: /** addConstraint allows you to add a Constraint to a Workflow.
076: * <PRE> myworkflow.addConstraint(mynewconstraint); </PRE>
077: * @param newConstraint - Constraint to add
078: **/
079:
080: void addConstraint(Constraint newConstraint);
081:
082: /** removeConstraint allows you to remove a Constraint from a Workflow.
083: * <PRE> myworkflow.removeConstraint(constraint); </PRE>
084: * @param constraint - Constraint to remove
085: **/
086:
087: void removeConstraint(Constraint constraint);
088:
089: /** sets a specific compute algorithm to use while computing the aggregated
090: * allocation results of the workflow. If this method is not called, the
091: * allocationresult will be aggregated using the default
092: * AllocationResultAggregator (Sum).
093: * @param aragg The AllocationResultAggregator to use.
094: * @see org.cougaar.planning.ldm.plan.AllocationResultAggregator
095: */
096: void setAllocationResultAggregator(AllocationResultAggregator aragg);
097:
098: /** Tells the infrastructure whether subtasks of the workflow
099: * should be rescinded when the Expansion of the workflow is rescinded.
100: * True means the infrastructure automatically performs the subtask rescinds.
101: * False means that the Plugin is responsible for rescinding the subtasks
102: * of the workflow or reattaching the workflow and its subtasks to
103: * a new parent task and its Expansion.
104: * @param isProp
105: **/
106: void setIsPropagatingToSubtasks(boolean isProp);
107:
108: /** @deprecated Use setIsPropagatingToSubtasks(boolean isProp) -
109: * default value is true
110: **/
111: void setIsPropagatingToSubtasks();
112:
113: }
|