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:26:05 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/albbn/src/org/cougaar/logistics/ldm/asset/consumerprops.def - DO NOT HAND EDIT */
028: /** Primary client interface for AmmoConsumerPG.
029: * @see NewAmmoConsumerPG
030: * @see AmmoConsumerPGImpl
031: **/package org.cougaar.logistics.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.logistics.ldm.MEIPrototypeProvider;
039: import org.cougaar.logistics.ldm.ClassIConsumerPrototypeProvider;
040: import org.cougaar.util.TimeSpan;
041:
042: public interface AmmoConsumerPG extends PropertyGroup,
043: org.cougaar.planning.ldm.dq.HasDataQuality {
044: Asset getMei();
045:
046: String getService();
047:
048: String getTheater();
049:
050: void initialize(MEIPrototypeProvider parentPlugin);
051:
052: List getPredicates();
053:
054: Schedule getParameterSchedule(Collection col, TimeSpan span);
055:
056: Rate getRate(Asset asset, List params);
057:
058: Collection getConsumed();
059:
060: PGDelegate copy(PropertyGroup del);
061:
062: // introspection and construction
063: /** the method of factoryClass that creates this type **/
064: String factoryMethod = "newAmmoConsumerPG";
065: /** the (mutable) class type returned by factoryMethod **/
066: String mutableClass = "org.cougaar.logistics.ldm.asset.NewAmmoConsumerPG";
067: /** the factory class **/
068: Class factoryClass = org.cougaar.logistics.ldm.asset.PropertyGroupFactory.class;
069: /** the (immutable) class type returned by domain factory **/
070: Class primaryClass = org.cougaar.logistics.ldm.asset.AmmoConsumerPG.class;
071: String assetSetter = "setAmmoConsumerPG";
072: String assetGetter = "getAmmoConsumerPG";
073: /** The Null instance for indicating that the PG definitely has no value **/
074: AmmoConsumerPG nullPG = new Null_AmmoConsumerPG();
075:
076: /** Null_PG implementation for AmmoConsumerPG **/
077: final class Null_AmmoConsumerPG implements AmmoConsumerPG, Null_PG {
078: public Asset getMei() {
079: throw new UndefinedValueException();
080: }
081:
082: public String getService() {
083: throw new UndefinedValueException();
084: }
085:
086: public String getTheater() {
087: throw new UndefinedValueException();
088: }
089:
090: public AmmoConsumerBG getAmmoBG() {
091: throw new UndefinedValueException();
092: }
093:
094: public void setAmmoBG(AmmoConsumerBG _ammoBG) {
095: throw new UndefinedValueException();
096: }
097:
098: public void initialize(MEIPrototypeProvider parentPlugin) {
099: throw new UndefinedValueException();
100: }
101:
102: public List getPredicates() {
103: throw new UndefinedValueException();
104: }
105:
106: public Schedule getParameterSchedule(Collection col,
107: TimeSpan span) {
108: throw new UndefinedValueException();
109: }
110:
111: public Rate getRate(Asset asset, List params) {
112: throw new UndefinedValueException();
113: }
114:
115: public Collection getConsumed() {
116: throw new UndefinedValueException();
117: }
118:
119: public PGDelegate copy(PropertyGroup del) {
120: throw new UndefinedValueException();
121: }
122:
123: public boolean equals(Object object) {
124: throw new UndefinedValueException();
125: }
126:
127: public Object clone() throws CloneNotSupportedException {
128: throw new CloneNotSupportedException();
129: }
130:
131: public NewPropertyGroup unlock(Object key) {
132: return null;
133: }
134:
135: public PropertyGroup lock(Object key) {
136: return null;
137: }
138:
139: public PropertyGroup lock() {
140: return null;
141: }
142:
143: public PropertyGroup copy() {
144: return null;
145: }
146:
147: public Class getPrimaryClass() {
148: return primaryClass;
149: }
150:
151: public String getAssetGetMethod() {
152: return assetGetter;
153: }
154:
155: public String getAssetSetMethod() {
156: return assetSetter;
157: }
158:
159: public Class getIntrospectionClass() {
160: return AmmoConsumerPGImpl.class;
161: }
162:
163: public boolean hasDataQuality() {
164: return false;
165: }
166:
167: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
168: return null;
169: }
170: }
171:
172: /** Future PG implementation for AmmoConsumerPG **/
173: final class Future implements AmmoConsumerPG, Future_PG {
174: public Asset getMei() {
175: waitForFinalize();
176: return _real.getMei();
177: }
178:
179: public String getService() {
180: waitForFinalize();
181: return _real.getService();
182: }
183:
184: public String getTheater() {
185: waitForFinalize();
186: return _real.getTheater();
187: }
188:
189: public boolean equals(Object object) {
190: waitForFinalize();
191: return _real.equals(object);
192: }
193:
194: public void initialize(MEIPrototypeProvider parentPlugin) {
195: waitForFinalize();
196: _real.initialize(parentPlugin);
197: }
198:
199: public List getPredicates() {
200: waitForFinalize();
201: return _real.getPredicates();
202: }
203:
204: public Schedule getParameterSchedule(Collection col,
205: TimeSpan span) {
206: waitForFinalize();
207: return _real.getParameterSchedule(col, span);
208: }
209:
210: public Rate getRate(Asset asset, List params) {
211: waitForFinalize();
212: return _real.getRate(asset, params);
213: }
214:
215: public Collection getConsumed() {
216: waitForFinalize();
217: return _real.getConsumed();
218: }
219:
220: public PGDelegate copy(PropertyGroup del) {
221: waitForFinalize();
222: return _real.copy(del);
223: }
224:
225: public Object clone() throws CloneNotSupportedException {
226: throw new CloneNotSupportedException();
227: }
228:
229: public NewPropertyGroup unlock(Object key) {
230: return null;
231: }
232:
233: public PropertyGroup lock(Object key) {
234: return null;
235: }
236:
237: public PropertyGroup lock() {
238: return null;
239: }
240:
241: public PropertyGroup copy() {
242: return null;
243: }
244:
245: public Class getPrimaryClass() {
246: return primaryClass;
247: }
248:
249: public String getAssetGetMethod() {
250: return assetGetter;
251: }
252:
253: public String getAssetSetMethod() {
254: return assetSetter;
255: }
256:
257: public Class getIntrospectionClass() {
258: return AmmoConsumerPGImpl.class;
259: }
260:
261: public synchronized boolean hasDataQuality() {
262: return (_real != null) && _real.hasDataQuality();
263: }
264:
265: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
266: return (_real == null) ? null : (_real.getDataQuality());
267: }
268:
269: // Finalization support
270: private AmmoConsumerPG _real = null;
271:
272: public synchronized void finalize(PropertyGroup real) {
273: if (real instanceof AmmoConsumerPG) {
274: _real = (AmmoConsumerPG) real;
275: notifyAll();
276: } else {
277: throw new IllegalArgumentException(
278: "Finalization with wrong class: " + real);
279: }
280: }
281:
282: private synchronized void waitForFinalize() {
283: while (_real == null) {
284: try {
285: wait();
286: } catch (InterruptedException _ie) {
287: // We should really let waitForFinalize throw InterruptedException
288: Thread.interrupted();
289: }
290: }
291: }
292: }
293: }
|