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