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