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