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 PackagedPOLConsumerPG.
029: * @see NewPackagedPOLConsumerPG
030: * @see PackagedPOLConsumerPGImpl
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 PackagedPOLConsumerPG 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 = "newPackagedPOLConsumerPG";
065: /** the (mutable) class type returned by factoryMethod **/
066: String mutableClass = "org.cougaar.logistics.ldm.asset.NewPackagedPOLConsumerPG";
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.PackagedPOLConsumerPG.class;
071: String assetSetter = "setPackagedPOLConsumerPG";
072: String assetGetter = "getPackagedPOLConsumerPG";
073: /** The Null instance for indicating that the PG definitely has no value **/
074: PackagedPOLConsumerPG nullPG = new Null_PackagedPOLConsumerPG();
075:
076: /** Null_PG implementation for PackagedPOLConsumerPG **/
077: final class Null_PackagedPOLConsumerPG implements
078: PackagedPOLConsumerPG, Null_PG {
079: public Asset getMei() {
080: throw new UndefinedValueException();
081: }
082:
083: public String getService() {
084: throw new UndefinedValueException();
085: }
086:
087: public String getTheater() {
088: throw new UndefinedValueException();
089: }
090:
091: public PackagedPOLConsumerBG getPackagedPOLBG() {
092: throw new UndefinedValueException();
093: }
094:
095: public void setPackagedPOLBG(
096: PackagedPOLConsumerBG _packagedPOLBG) {
097: throw new UndefinedValueException();
098: }
099:
100: public void initialize(MEIPrototypeProvider parentPlugin) {
101: throw new UndefinedValueException();
102: }
103:
104: public List getPredicates() {
105: throw new UndefinedValueException();
106: }
107:
108: public Schedule getParameterSchedule(Collection col,
109: TimeSpan span) {
110: throw new UndefinedValueException();
111: }
112:
113: public Rate getRate(Asset asset, List params) {
114: throw new UndefinedValueException();
115: }
116:
117: public Collection getConsumed() {
118: throw new UndefinedValueException();
119: }
120:
121: public PGDelegate copy(PropertyGroup del) {
122: throw new UndefinedValueException();
123: }
124:
125: public boolean equals(Object object) {
126: throw new UndefinedValueException();
127: }
128:
129: public Object clone() throws CloneNotSupportedException {
130: throw new CloneNotSupportedException();
131: }
132:
133: public NewPropertyGroup unlock(Object key) {
134: return null;
135: }
136:
137: public PropertyGroup lock(Object key) {
138: return null;
139: }
140:
141: public PropertyGroup lock() {
142: return null;
143: }
144:
145: public PropertyGroup copy() {
146: return null;
147: }
148:
149: public Class getPrimaryClass() {
150: return primaryClass;
151: }
152:
153: public String getAssetGetMethod() {
154: return assetGetter;
155: }
156:
157: public String getAssetSetMethod() {
158: return assetSetter;
159: }
160:
161: public Class getIntrospectionClass() {
162: return PackagedPOLConsumerPGImpl.class;
163: }
164:
165: public boolean hasDataQuality() {
166: return false;
167: }
168:
169: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
170: return null;
171: }
172: }
173:
174: /** Future PG implementation for PackagedPOLConsumerPG **/
175: final class Future implements PackagedPOLConsumerPG, Future_PG {
176: public Asset getMei() {
177: waitForFinalize();
178: return _real.getMei();
179: }
180:
181: public String getService() {
182: waitForFinalize();
183: return _real.getService();
184: }
185:
186: public String getTheater() {
187: waitForFinalize();
188: return _real.getTheater();
189: }
190:
191: public boolean equals(Object object) {
192: waitForFinalize();
193: return _real.equals(object);
194: }
195:
196: public void initialize(MEIPrototypeProvider parentPlugin) {
197: waitForFinalize();
198: _real.initialize(parentPlugin);
199: }
200:
201: public List getPredicates() {
202: waitForFinalize();
203: return _real.getPredicates();
204: }
205:
206: public Schedule getParameterSchedule(Collection col,
207: TimeSpan span) {
208: waitForFinalize();
209: return _real.getParameterSchedule(col, span);
210: }
211:
212: public Rate getRate(Asset asset, List params) {
213: waitForFinalize();
214: return _real.getRate(asset, params);
215: }
216:
217: public Collection getConsumed() {
218: waitForFinalize();
219: return _real.getConsumed();
220: }
221:
222: public PGDelegate copy(PropertyGroup del) {
223: waitForFinalize();
224: return _real.copy(del);
225: }
226:
227: public Object clone() throws CloneNotSupportedException {
228: throw new CloneNotSupportedException();
229: }
230:
231: public NewPropertyGroup unlock(Object key) {
232: return null;
233: }
234:
235: public PropertyGroup lock(Object key) {
236: return null;
237: }
238:
239: public PropertyGroup lock() {
240: return null;
241: }
242:
243: public PropertyGroup copy() {
244: return null;
245: }
246:
247: public Class getPrimaryClass() {
248: return primaryClass;
249: }
250:
251: public String getAssetGetMethod() {
252: return assetGetter;
253: }
254:
255: public String getAssetSetMethod() {
256: return assetSetter;
257: }
258:
259: public Class getIntrospectionClass() {
260: return PackagedPOLConsumerPGImpl.class;
261: }
262:
263: public synchronized boolean hasDataQuality() {
264: return (_real != null) && _real.hasDataQuality();
265: }
266:
267: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
268: return (_real == null) ? null : (_real.getDataQuality());
269: }
270:
271: // Finalization support
272: private PackagedPOLConsumerPG _real = null;
273:
274: public synchronized void finalize(PropertyGroup real) {
275: if (real instanceof PackagedPOLConsumerPG) {
276: _real = (PackagedPOLConsumerPG) real;
277: notifyAll();
278: } else {
279: throw new IllegalArgumentException(
280: "Finalization with wrong class: " + real);
281: }
282: }
283:
284: private synchronized void waitForFinalize() {
285: while (_real == null) {
286: try {
287: wait();
288: } catch (InterruptedException _ie) {
289: // We should really let waitForFinalize throw InterruptedException
290: Thread.interrupted();
291: }
292: }
293: }
294: }
295: }
|