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