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