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: /* @generated Thu Sep 27 15:21:47 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/glm/src/org/cougaar/glm/ldm/asset/alpprops.def - DO NOT HAND EDIT */
028: /** Primary client interface for InventoryLevelsPG.
029: * Represent the schedules of thresholds taken into account when making ordering decisions at the inventory manager. How great is the demand of the next x days, when do we reorder, how much do we reorder.
030: * @see NewInventoryLevelsPG
031: * @see InventoryLevelsPGImpl
032: **/package org.cougaar.glm.ldm.asset;
033:
034: import org.cougaar.planning.ldm.measure.*;
035: import org.cougaar.planning.ldm.asset.*;
036: import org.cougaar.planning.ldm.plan.*;
037: import java.util.*;
038:
039: import org.cougaar.glm.ldm.plan.*;
040: import org.cougaar.glm.ldm.oplan.*;
041: import org.cougaar.glm.ldm.policy.*;
042: import org.cougaar.core.mts.MessageAddress;
043: import org.cougaar.glm.execution.common.InventoryReport;
044:
045: public interface InventoryLevelsPG extends PropertyGroup,
046: org.cougaar.planning.ldm.dq.HasDataQuality {
047: Schedule getAverageDemandSchedule();
048:
049: /** The quantity-schedule showing the level which when stock levels fall below a replenish order will be placed. **/
050: Schedule getReorderLevelSchedule();
051:
052: /** The quantity-schedule showing the level to which one ultimately wants to bring the inventory level to when reordering. **/
053: Schedule getGoalLevelSchedule();
054:
055: // introspection and construction
056: /** the method of factoryClass that creates this type **/
057: String factoryMethod = "newInventoryLevelsPG";
058: /** the (mutable) class type returned by factoryMethod **/
059: String mutableClass = "org.cougaar.glm.ldm.asset.NewInventoryLevelsPG";
060: /** the factory class **/
061: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
062: /** the (immutable) class type returned by domain factory **/
063: Class primaryClass = org.cougaar.glm.ldm.asset.InventoryLevelsPG.class;
064: String assetSetter = "setInventoryLevelsPG";
065: String assetGetter = "getInventoryLevelsPG";
066: /** The Null instance for indicating that the PG definitely has no value **/
067: InventoryLevelsPG nullPG = new Null_InventoryLevelsPG();
068:
069: /** Null_PG implementation for InventoryLevelsPG **/
070: final class Null_InventoryLevelsPG implements InventoryLevelsPG,
071: Null_PG {
072: public Schedule getAverageDemandSchedule() {
073: throw new UndefinedValueException();
074: }
075:
076: public Schedule getReorderLevelSchedule() {
077: throw new UndefinedValueException();
078: }
079:
080: public Schedule getGoalLevelSchedule() {
081: throw new UndefinedValueException();
082: }
083:
084: public boolean equals(Object object) {
085: throw new UndefinedValueException();
086: }
087:
088: public Object clone() throws CloneNotSupportedException {
089: throw new CloneNotSupportedException();
090: }
091:
092: public NewPropertyGroup unlock(Object key) {
093: return null;
094: }
095:
096: public PropertyGroup lock(Object key) {
097: return null;
098: }
099:
100: public PropertyGroup lock() {
101: return null;
102: }
103:
104: public PropertyGroup copy() {
105: return null;
106: }
107:
108: public Class getPrimaryClass() {
109: return primaryClass;
110: }
111:
112: public String getAssetGetMethod() {
113: return assetGetter;
114: }
115:
116: public String getAssetSetMethod() {
117: return assetSetter;
118: }
119:
120: public Class getIntrospectionClass() {
121: return InventoryLevelsPGImpl.class;
122: }
123:
124: public boolean hasDataQuality() {
125: return false;
126: }
127:
128: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
129: return null;
130: }
131: }
132:
133: /** Future PG implementation for InventoryLevelsPG **/
134: final class Future implements InventoryLevelsPG, Future_PG {
135: public Schedule getAverageDemandSchedule() {
136: waitForFinalize();
137: return _real.getAverageDemandSchedule();
138: }
139:
140: public Schedule getReorderLevelSchedule() {
141: waitForFinalize();
142: return _real.getReorderLevelSchedule();
143: }
144:
145: public Schedule getGoalLevelSchedule() {
146: waitForFinalize();
147: return _real.getGoalLevelSchedule();
148: }
149:
150: public boolean equals(Object object) {
151: waitForFinalize();
152: return _real.equals(object);
153: }
154:
155: public Object clone() throws CloneNotSupportedException {
156: throw new CloneNotSupportedException();
157: }
158:
159: public NewPropertyGroup unlock(Object key) {
160: return null;
161: }
162:
163: public PropertyGroup lock(Object key) {
164: return null;
165: }
166:
167: public PropertyGroup lock() {
168: return null;
169: }
170:
171: public PropertyGroup copy() {
172: return null;
173: }
174:
175: public Class getPrimaryClass() {
176: return primaryClass;
177: }
178:
179: public String getAssetGetMethod() {
180: return assetGetter;
181: }
182:
183: public String getAssetSetMethod() {
184: return assetSetter;
185: }
186:
187: public Class getIntrospectionClass() {
188: return InventoryLevelsPGImpl.class;
189: }
190:
191: public synchronized boolean hasDataQuality() {
192: return (_real != null) && _real.hasDataQuality();
193: }
194:
195: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
196: return (_real == null) ? null : (_real.getDataQuality());
197: }
198:
199: // Finalization support
200: private InventoryLevelsPG _real = null;
201:
202: public synchronized void finalize(PropertyGroup real) {
203: if (real instanceof InventoryLevelsPG) {
204: _real = (InventoryLevelsPG) real;
205: notifyAll();
206: } else {
207: throw new IllegalArgumentException(
208: "Finalization with wrong class: " + real);
209: }
210: }
211:
212: private synchronized void waitForFinalize() {
213: while (_real == null) {
214: try {
215: wait();
216: } catch (InterruptedException _ie) {
217: // We should really let waitForFinalize throw InterruptedException
218: Thread.interrupted();
219: }
220: }
221: }
222: }
223: }
|