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