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