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:
27: package org.cougaar.planning.ldm;
28:
29: import org.cougaar.planning.ldm.asset.Asset;
30:
31: /**
32: * A provider of prototype Assets to the LDM.
33: * @see org.cougaar.planning.ldm.LDMPluginServesLDM
34: **/
35: public interface PrototypeProvider extends LDMPluginServesLDM {
36:
37: /** return the prototype Asset described by aTypeName.
38: * implementations should probably call LDMServesPlugin.cachePrototype
39: * and LDMServesPlugin.fillProperties if needed before returning.
40: *
41: * May return null if aTypeName is not something that the implementation
42: * knows about.
43: *
44: * An example aTypeName: "NSN/12345678901234".
45: *
46: * The returned Asset will usually, but not always have a primary
47: * type identifier that is equal to the aTypeName. In cases where
48: * it does not match, aTypeName must appear as one of the extra type
49: * identifiers of the returned asset. PrototypeProviders should cache
50: * the prototype under both type identifiers in these cases.
51: *
52: * @param aTypeName specifies an Asset description.
53: * @param anAssetClassHint is an optional hint to LDM plugins
54: * to reduce their potential work load. If non-null, the returned asset
55: * (if any) should be an instance the specified class or one of its
56: * subclasses.
57: **/
58: Asset getPrototype(String aTypeName, Class anAssetClassHint);
59:
60: /** bulk version of getPrototype(String).
61: * Will never return null.
62: **/
63: // Enumeration getPrototypes(Enumeration typeNames);
64: }
|