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