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