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 FuelSupplyPG.
029: * @see NewFuelSupplyPG
030: * @see FuelSupplyPGImpl
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 FuelSupplyPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** Comma separated string of fuel types eg. "JP3, JP4" **/
047: String getFuelTypes();
048:
049: Volume getStoreVolumePerDay();
050:
051: Volume getDistributeVolumePerDay();
052:
053: Volume getIssueVolumePerDay();
054:
055: Volume getPumpVolumePerMinute();
056:
057: // introspection and construction
058: /** the method of factoryClass that creates this type **/
059: String factoryMethod = "newFuelSupplyPG";
060: /** the (mutable) class type returned by factoryMethod **/
061: String mutableClass = "org.cougaar.glm.ldm.asset.NewFuelSupplyPG";
062: /** the factory class **/
063: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
064: /** the (immutable) class type returned by domain factory **/
065: Class primaryClass = org.cougaar.glm.ldm.asset.FuelSupplyPG.class;
066: String assetSetter = "setFuelSupplyPG";
067: String assetGetter = "getFuelSupplyPG";
068: /** The Null instance for indicating that the PG definitely has no value **/
069: FuelSupplyPG nullPG = new Null_FuelSupplyPG();
070:
071: /** Null_PG implementation for FuelSupplyPG **/
072: final class Null_FuelSupplyPG implements FuelSupplyPG, Null_PG {
073: public String getFuelTypes() {
074: throw new UndefinedValueException();
075: }
076:
077: public Volume getStoreVolumePerDay() {
078: throw new UndefinedValueException();
079: }
080:
081: public Volume getDistributeVolumePerDay() {
082: throw new UndefinedValueException();
083: }
084:
085: public Volume getIssueVolumePerDay() {
086: throw new UndefinedValueException();
087: }
088:
089: public Volume getPumpVolumePerMinute() {
090: throw new UndefinedValueException();
091: }
092:
093: public boolean equals(Object object) {
094: throw new UndefinedValueException();
095: }
096:
097: public Object clone() throws CloneNotSupportedException {
098: throw new CloneNotSupportedException();
099: }
100:
101: public NewPropertyGroup unlock(Object key) {
102: return null;
103: }
104:
105: public PropertyGroup lock(Object key) {
106: return null;
107: }
108:
109: public PropertyGroup lock() {
110: return null;
111: }
112:
113: public PropertyGroup copy() {
114: return null;
115: }
116:
117: public Class getPrimaryClass() {
118: return primaryClass;
119: }
120:
121: public String getAssetGetMethod() {
122: return assetGetter;
123: }
124:
125: public String getAssetSetMethod() {
126: return assetSetter;
127: }
128:
129: public Class getIntrospectionClass() {
130: return FuelSupplyPGImpl.class;
131: }
132:
133: public boolean hasDataQuality() {
134: return false;
135: }
136:
137: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
138: return null;
139: }
140: }
141:
142: /** Future PG implementation for FuelSupplyPG **/
143: final class Future implements FuelSupplyPG, Future_PG {
144: public String getFuelTypes() {
145: waitForFinalize();
146: return _real.getFuelTypes();
147: }
148:
149: public Volume getStoreVolumePerDay() {
150: waitForFinalize();
151: return _real.getStoreVolumePerDay();
152: }
153:
154: public Volume getDistributeVolumePerDay() {
155: waitForFinalize();
156: return _real.getDistributeVolumePerDay();
157: }
158:
159: public Volume getIssueVolumePerDay() {
160: waitForFinalize();
161: return _real.getIssueVolumePerDay();
162: }
163:
164: public Volume getPumpVolumePerMinute() {
165: waitForFinalize();
166: return _real.getPumpVolumePerMinute();
167: }
168:
169: public boolean equals(Object object) {
170: waitForFinalize();
171: return _real.equals(object);
172: }
173:
174: public Object clone() throws CloneNotSupportedException {
175: throw new CloneNotSupportedException();
176: }
177:
178: public NewPropertyGroup unlock(Object key) {
179: return null;
180: }
181:
182: public PropertyGroup lock(Object key) {
183: return null;
184: }
185:
186: public PropertyGroup lock() {
187: return null;
188: }
189:
190: public PropertyGroup copy() {
191: return null;
192: }
193:
194: public Class getPrimaryClass() {
195: return primaryClass;
196: }
197:
198: public String getAssetGetMethod() {
199: return assetGetter;
200: }
201:
202: public String getAssetSetMethod() {
203: return assetSetter;
204: }
205:
206: public Class getIntrospectionClass() {
207: return FuelSupplyPGImpl.class;
208: }
209:
210: public synchronized boolean hasDataQuality() {
211: return (_real != null) && _real.hasDataQuality();
212: }
213:
214: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
215: return (_real == null) ? null : (_real.getDataQuality());
216: }
217:
218: // Finalization support
219: private FuelSupplyPG _real = null;
220:
221: public synchronized void finalize(PropertyGroup real) {
222: if (real instanceof FuelSupplyPG) {
223: _real = (FuelSupplyPG) real;
224: notifyAll();
225: } else {
226: throw new IllegalArgumentException(
227: "Finalization with wrong class: " + real);
228: }
229: }
230:
231: private synchronized void waitForFinalize() {
232: while (_real == null) {
233: try {
234: wait();
235: } catch (InterruptedException _ie) {
236: // We should really let waitForFinalize throw InterruptedException
237: Thread.interrupted();
238: }
239: }
240: }
241: }
242: }
|