01: /*
02: * <copyright>
03: *
04: * Copyright 1997-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26: package org.cougaar.planning.ldm.asset;
27:
28: import java.io.Serializable;
29:
30: public interface PropertyGroup extends Serializable, Cloneable {
31:
32: Object clone() throws CloneNotSupportedException;
33:
34: /** Unlock the PropertyGroup by returning an object which
35: * has setter methods that side-effect this object.
36: * The key must be == the key that locked the property
37: * in the first place or an Exception is thrown.
38: * @exception IllegalAccessException
39: **/
40: NewPropertyGroup unlock(Object key) throws IllegalAccessException;
41:
42: /** lock a property by returning an immutable object which
43: * has a private view into the original object.
44: * If key == null, the result is a locked object which cannot be unlocked.
45: **/
46: PropertyGroup lock(Object key);
47:
48: /** alias for lock(null)
49: **/
50: PropertyGroup lock();
51:
52: /** Convenience method. equivalent to clone();
53: **/
54: PropertyGroup copy();
55:
56: /** returns the class of the main property interface for this
57: * property group.
58: **/
59: Class getPrimaryClass();
60:
61: /** @return the method name on an asset to retrieve the PG **/
62: String getAssetGetMethod();
63:
64: /** @return the method name on an asset to set the PG **/
65: String getAssetSetMethod();
66:
67: // DataQuality
68: /** @return true IFF the instance not only supports DataQuality
69: * queries (e.g. is instanceof HasDataQuality), but getDataQuality()
70: * will return non-null.
71: **/
72: boolean hasDataQuality();
73: }
|