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