001: package org.cougaar.logistics.plugin.inventory;
002:
003: import org.cougaar.planning.ldm.plan.Task;
004: import org.cougaar.planning.ldm.plan.Expansion;
005: import org.cougaar.planning.ldm.PlanningFactory;
006: import org.cougaar.planning.ldm.asset.Asset;
007: import org.cougaar.glm.ldm.asset.Inventory;
008: import org.cougaar.glm.ldm.asset.Organization;
009: import org.cougaar.core.mts.MessageAddress;
010:
011: import java.util.List;
012:
013: /**
014: * What the inventory plugin exports as methods to the modules
015: */
016: public interface InventoryManager extends UtilsProvider {
017: String getSupplyType();
018:
019: /**
020: * @see InventoryLevelGenerator#getTargetLevel
021: * @return org name
022: */
023: String getOrgName();
024:
025: Organization getMyOrganization();
026:
027: MessageAddress getClusterId();
028:
029: /**
030: * @see SupplyExpander#updateChangedProjections
031: * @see SupplyExpander#updateChangedRequisitions
032: * @return oplan arrival
033: */
034: long getOPlanArrivalInTheaterTime();
035:
036: /**
037: * @see TaskUtils#changeDatePrefs
038: * @return end of the oplan
039: */
040: long getOPlanEndTime();
041:
042: long getCurrentTimeMillis();
043:
044: PlanningFactory getPlanningFactory();
045:
046: void publishAdd(Object object);
047:
048: void publishAddExpansion(Expansion expansion);
049:
050: void publishChange(Object object);
051:
052: /**
053: * @see ExternalAllocator#rescindTaskAllocations
054: * @see ReconcileSupplyExpander#expandAndDistributeRequisitions
055: * @see RefillComparator#compareRefills
056: * @param object
057: */
058: void publishRemove(Object object);
059:
060: /**
061: * Called by the RefillGenerator to hook up the refill task to the maintain
062: * inventory parent task and workflow.
063: * @see DiffBasedComparator#compareRefills
064: * @see DiffBasedComparator#compareRefillProjections
065: */
066: boolean publishRefillTask(Task task, Inventory inventory);
067:
068: /**
069: * Called by DiffBasedComparator
070: * @see DiffBasedComparator#compareRefills
071: * @param taskToRemove
072: */
073: void removeSubTask(Task taskToRemove);
074:
075: /**
076: * @see ExternalAllocator#findBestSource(org.cougaar.planning.ldm.plan.Task)
077: * @param task
078: * @return List of 0 or 2 TimeSpans
079: */
080: List getNewTaskSplitTimes(Task task);
081:
082: /**
083: * @see org.cougaar.logistics.plugin.inventory.RefillGenerator#calculateRefills(java.util.Collection, org.cougaar.logistics.plugin.inventory.ComparatorModule)
084: */
085: void disposeOfUnusedMILTask(Inventory inventory, boolean noRefills);
086:
087: /**
088: * @see SupplyExpander#getLogisticsInventoryPG
089: * @param taskWithInventory
090: * @param inventory
091: */
092: void touchInventoryForTask(Task taskWithInventory,
093: Inventory inventory);
094:
095: /**
096: * Not called in AL.
097: * @param t
098: * @return (new) inventory
099: */
100: Inventory findOrMakeInventory(Task t);
101:
102: /**
103: * @see ExternalAllocator#updateAllocationResult(java.util.Collection)
104: * @see SupplyExpander#getLogisticsInventoryPG(org.cougaar.planning.ldm.plan.Task)
105: * @see TaskUtils#splitProjection(org.cougaar.planning.ldm.plan.Task, java.util.List, InventoryManager)
106: * @param a
107: * @return (new) inventory
108: */
109: Inventory findOrMakeInventory(Asset a);
110: }
|