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 SupplyPG.
029: * @see NewSupplyPG
030: * @see SupplyPGImpl
031: **/package org.cougaar.glm.ldm.asset;
032:
033: import org.cougaar.planning.ldm.measure.*;
034: import org.cougaar.planning.ldm.asset.*;
035: import org.cougaar.planning.ldm.plan.*;
036: import java.util.*;
037:
038: import org.cougaar.glm.ldm.plan.*;
039: import org.cougaar.glm.ldm.oplan.*;
040: import org.cougaar.glm.ldm.policy.*;
041: import org.cougaar.core.mts.MessageAddress;
042: import org.cougaar.glm.execution.common.InventoryReport;
043:
044: public interface SupplyPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** The maximum mass of class 1 materiel that can be stored, issued and transloaded per day **/
047: Mass getClass1HandleMassPerDay();
048:
049: /** The maximum mass of class 2 materiel that can be stored, issued and transloaded per day **/
050: Mass getClass2HandleMassPerDay();
051:
052: /** The maximum mass of class 3p materiel that can be stored, issued and transloaded per day **/
053: Mass getClass3pHandleMassPerDay();
054:
055: /** The maximum mass of class 4b materiel that can be stored, issued and transloaded per day **/
056: Mass getClass4bHandleMassPerDay();
057:
058: /** The maximum mass of class 4 materiel that can be stored, issued and transloaded per day **/
059: Mass getClass4HandleMassPerDay();
060:
061: /** The maximum mass of class 5 materiel that can be transloaded per day **/
062: Mass getClass5TransloadMassPerDay();
063:
064: /** The maximum mass of class 7 materiel that can be stored, issued and transloaded per day **/
065: Mass getClass7HandleMassPerDay();
066:
067: /** The maximum mass of class 9 materiel that can be stored, issued and transloaded per day **/
068: Mass getClass9HandleMassPerDay();
069:
070: // introspection and construction
071: /** the method of factoryClass that creates this type **/
072: String factoryMethod = "newSupplyPG";
073: /** the (mutable) class type returned by factoryMethod **/
074: String mutableClass = "org.cougaar.glm.ldm.asset.NewSupplyPG";
075: /** the factory class **/
076: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
077: /** the (immutable) class type returned by domain factory **/
078: Class primaryClass = org.cougaar.glm.ldm.asset.SupplyPG.class;
079: String assetSetter = "setSupplyPG";
080: String assetGetter = "getSupplyPG";
081: /** The Null instance for indicating that the PG definitely has no value **/
082: SupplyPG nullPG = new Null_SupplyPG();
083:
084: /** Null_PG implementation for SupplyPG **/
085: final class Null_SupplyPG implements SupplyPG, Null_PG {
086: public Mass getClass1HandleMassPerDay() {
087: throw new UndefinedValueException();
088: }
089:
090: public Mass getClass2HandleMassPerDay() {
091: throw new UndefinedValueException();
092: }
093:
094: public Mass getClass3pHandleMassPerDay() {
095: throw new UndefinedValueException();
096: }
097:
098: public Mass getClass4bHandleMassPerDay() {
099: throw new UndefinedValueException();
100: }
101:
102: public Mass getClass4HandleMassPerDay() {
103: throw new UndefinedValueException();
104: }
105:
106: public Mass getClass5TransloadMassPerDay() {
107: throw new UndefinedValueException();
108: }
109:
110: public Mass getClass7HandleMassPerDay() {
111: throw new UndefinedValueException();
112: }
113:
114: public Mass getClass9HandleMassPerDay() {
115: throw new UndefinedValueException();
116: }
117:
118: public boolean equals(Object object) {
119: throw new UndefinedValueException();
120: }
121:
122: public Object clone() throws CloneNotSupportedException {
123: throw new CloneNotSupportedException();
124: }
125:
126: public NewPropertyGroup unlock(Object key) {
127: return null;
128: }
129:
130: public PropertyGroup lock(Object key) {
131: return null;
132: }
133:
134: public PropertyGroup lock() {
135: return null;
136: }
137:
138: public PropertyGroup copy() {
139: return null;
140: }
141:
142: public Class getPrimaryClass() {
143: return primaryClass;
144: }
145:
146: public String getAssetGetMethod() {
147: return assetGetter;
148: }
149:
150: public String getAssetSetMethod() {
151: return assetSetter;
152: }
153:
154: public Class getIntrospectionClass() {
155: return SupplyPGImpl.class;
156: }
157:
158: public boolean hasDataQuality() {
159: return false;
160: }
161:
162: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
163: return null;
164: }
165: }
166:
167: /** Future PG implementation for SupplyPG **/
168: final class Future implements SupplyPG, Future_PG {
169: public Mass getClass1HandleMassPerDay() {
170: waitForFinalize();
171: return _real.getClass1HandleMassPerDay();
172: }
173:
174: public Mass getClass2HandleMassPerDay() {
175: waitForFinalize();
176: return _real.getClass2HandleMassPerDay();
177: }
178:
179: public Mass getClass3pHandleMassPerDay() {
180: waitForFinalize();
181: return _real.getClass3pHandleMassPerDay();
182: }
183:
184: public Mass getClass4bHandleMassPerDay() {
185: waitForFinalize();
186: return _real.getClass4bHandleMassPerDay();
187: }
188:
189: public Mass getClass4HandleMassPerDay() {
190: waitForFinalize();
191: return _real.getClass4HandleMassPerDay();
192: }
193:
194: public Mass getClass5TransloadMassPerDay() {
195: waitForFinalize();
196: return _real.getClass5TransloadMassPerDay();
197: }
198:
199: public Mass getClass7HandleMassPerDay() {
200: waitForFinalize();
201: return _real.getClass7HandleMassPerDay();
202: }
203:
204: public Mass getClass9HandleMassPerDay() {
205: waitForFinalize();
206: return _real.getClass9HandleMassPerDay();
207: }
208:
209: public boolean equals(Object object) {
210: waitForFinalize();
211: return _real.equals(object);
212: }
213:
214: public Object clone() throws CloneNotSupportedException {
215: throw new CloneNotSupportedException();
216: }
217:
218: public NewPropertyGroup unlock(Object key) {
219: return null;
220: }
221:
222: public PropertyGroup lock(Object key) {
223: return null;
224: }
225:
226: public PropertyGroup lock() {
227: return null;
228: }
229:
230: public PropertyGroup copy() {
231: return null;
232: }
233:
234: public Class getPrimaryClass() {
235: return primaryClass;
236: }
237:
238: public String getAssetGetMethod() {
239: return assetGetter;
240: }
241:
242: public String getAssetSetMethod() {
243: return assetSetter;
244: }
245:
246: public Class getIntrospectionClass() {
247: return SupplyPGImpl.class;
248: }
249:
250: public synchronized boolean hasDataQuality() {
251: return (_real != null) && _real.hasDataQuality();
252: }
253:
254: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
255: return (_real == null) ? null : (_real.getDataQuality());
256: }
257:
258: // Finalization support
259: private SupplyPG _real = null;
260:
261: public synchronized void finalize(PropertyGroup real) {
262: if (real instanceof SupplyPG) {
263: _real = (SupplyPG) real;
264: notifyAll();
265: } else {
266: throw new IllegalArgumentException(
267: "Finalization with wrong class: " + real);
268: }
269: }
270:
271: private synchronized void waitForFinalize() {
272: while (_real == null) {
273: try {
274: wait();
275: } catch (InterruptedException _ie) {
276: // We should really let waitForFinalize throw InterruptedException
277: Thread.interrupted();
278: }
279: }
280: }
281: }
282: }
|