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