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