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