01: /*
02: * <copyright>
03: *
04: * Copyright 1997-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26:
27: package org.cougaar.planning.ldm;
28:
29: import org.cougaar.core.domain.XPlan;
30: import org.cougaar.core.util.UID;
31: import org.cougaar.planning.ldm.asset.Asset;
32: import org.cougaar.planning.ldm.plan.PlanElement;
33: import org.cougaar.planning.ldm.plan.Task;
34:
35: /**
36: * Planning-specify view of the blackboard.
37: */
38: public interface LogPlan extends XPlan {
39: /** find the PlanElement associated with a task in the LogPlan.
40: * This is an optimization of searchLogPlan, since it needs to be done
41: * far more often than the general case.
42: **/
43: PlanElement findPlanElement(Task task);
44:
45: /** like findPlanElement(Task) but looks up based on task's proxiable ID **/
46: PlanElement findPlanElement(String task);
47:
48: PlanElement findPlanElement(UID uid);
49:
50: /** find the LogPlan task matching Task. This is normally the
51: * identity operation, though it may be that (via serialization and
52: * task proxies) two task instances may actually refer to the same task.
53: **/
54: Task findTask(Task task);
55:
56: /** like findTask(Task), but looks up via proxiable id **/
57: Task findTask(String id);
58:
59: Task findTask(UID uid);
60:
61: /** Find the Asset in the logplan. This will be an identity operation
62: * modulo serialization and copying.
63: **/
64: Asset findAsset(Asset asset);
65:
66: /** find the Asset in the logplan by its itemIdentification.
67: **/
68: Asset findAsset(String id);
69:
70: // Necessary for metrics count updates
71: void incAssetCount(int inc);
72:
73: void incPlanElementCount(int inc);
74:
75: void incTaskCount(int inc);
76:
77: void incWorkflowCount(int inc);
78: }
|