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