| org.cougaar.planning.ldm.PlanningFactory
All known Subclasses: org.cougaar.planning.ldm.PlanningFactoryImpl,
Method Summary | |
void | addAssetFactory(EssentialAssetFactory af) register an assetfactory with us so that we can
(1) find an asset class from an asset name and (2)
can figure out which factory to use for a given
asset class. | void | addPropertyGroupFactory(Object pf) register a propertyfactory with us so that short (no package!)
property group names may be used in createPropertyGroup(String). | Asset | cloneInstance(Asset asset) make an evil twin of an instance. | boolean | containsAssetFactory(Object f) | boolean | containsPropertyGroupFactory(Object pf) | Asset | copyInstance(Asset asset) Make a copy of an instance. | Object | create(String objectname) | Object | create(Class objectclass) | Asset | createAggregate(Asset prototypeAsset, int quantity) Create an aggregate asset instance of a prototypical asset. | Asset | createAggregate(String prototypeAssetTypeId, int quantity) Create an aggregate asset instance of a prototypical asset. | Asset | createAsset(String classname) Create a raw Asset instance for use by LDM Plugins
which are PrototypeProviders.
The asset created will have *no* propertygroups.
This *always* creates a prototype of the specific class.
most plugins want to call getPrototype(String typeid);
Parameters: classname - One of the defined LDM class names. | Asset | createAsset(Class assetClass) Create a raw Asset instance for use by LDM Plugins
which are PrototypeProviders. | Asset | createInstance(Asset prototypeAsset) Create an instance of a prototypical asset.
This variation does not add an ItemIdentificationCode
to the constructed asset instance. | Asset | createInstance(String prototypeAssetTypeId) Create an instance of a prototypical asset.
This variation does not add an ItemIdentificationCode
to the constructed asset instance. | Asset | createInstance(Asset prototypeAsset, String uniqueId) Create an instance of a prototypical asset, specifying an initial
UniqueID for its itemIdentificationPG . | Asset | createInstance(String prototypeAssetTypeId, String uniqueId) Create an instance of a prototypical asset, specifying an initial UniqueID
for its itemIdentificationPG. | Asset | createInstance(String prototypeAssetTypeId, int quantity) Create an aggregate asset instance of a prototypical asset. | PropertyGroup | createPropertyGroup(String propertyName) create a new property group, given a PropertyGroup name. | PropertyGroup | createPropertyGroup(Class propertyClass) create a new property group, given a PropertyGroupGroup name. | PropertyGroup | createPropertyGroup(PropertyGroup originalProperty) | Asset | createPrototype(String classname, String typeid) convenience routine for creating prototype assets. | Asset | createPrototype(Class assetclass, String typeid) convenience routine for creating prototype assets. | Asset | createPrototype(String classname, String typeid, String nomen) convenience routine for creating prototype assets. | Asset | getPrototype(String aTypeName) Find a prototype Asset based on it's typeid description,
(e.g. |
addAssetFactory | void addAssetFactory(EssentialAssetFactory af)(Code) | | register an assetfactory with us so that we can
(1) find an asset class from an asset name and (2)
can figure out which factory to use for a given
asset class.
|
addPropertyGroupFactory | void addPropertyGroupFactory(Object pf)(Code) | | register a propertyfactory with us so that short (no package!)
property group names may be used in createPropertyGroup(String).
Either a PropertyGroupFactory class or an instance of such may be passed in.
|
cloneInstance | Asset cloneInstance(Asset asset)(Code) | | make an evil twin of an instance. The result will be a shallow copy of the
original (as in copyInstance), with locked PropertyGroups. The copy
will have the same UID as the original, so will, in a systems sense
actually be the same asset. It could be very bad for multiple clones of an
asset to show up in someone's Blackboard.
This method should be used when subsetting the capabilities of an asset
for some other consumer. Eg. when you want to allow a client to use just one
capability of your organization.
Note: This method name may change.
|
containsAssetFactory | boolean containsAssetFactory(Object f)(Code) | | |
containsPropertyGroupFactory | boolean containsPropertyGroupFactory(Object pf)(Code) | | true iff the factory parameter is already registered as apropertygroup factory. |
copyInstance | Asset copyInstance(Asset asset)(Code) | | Make a copy of an instance. The result will be a shallow copy
of the original - that is, it will share most PropertyGroups with the
original instance. The differences will be that the copy's PGs will
be locked and the copy will have a different UID.
The copy will truly be a different asset which happens to (initially) have
identical propertygroups.
This method should be used to create new assets which are very much
like another instance. The use of this method is a less-desirable alternative
to creating a new instance of your original's prototype and then adding back
any extra properties. This is less desirable because it doesn't allow the
LDM to participate in the construction of the copy.
|
createAggregate | Asset createAggregate(Asset prototypeAsset, int quantity)(Code) | | Create an aggregate asset instance of a prototypical asset.
|
createAggregate | Asset createAggregate(String prototypeAssetTypeId, int quantity)(Code) | | Create an aggregate asset instance of a prototypical asset.
|
createAsset | Asset createAsset(String classname)(Code) | | Create a raw Asset instance for use by LDM Plugins
which are PrototypeProviders.
The asset created will have *no* propertygroups.
This *always* creates a prototype of the specific class.
most plugins want to call getPrototype(String typeid);
Parameters: classname - One of the defined LDM class names. This mustbe the actual class name without the package path. For example,"Container" is correct, "org.cougaar.planning.ldm.asset.Container" is not. |
createAsset | Asset createAsset(Class assetClass)(Code) | | Create a raw Asset instance for use by LDM Plugins
which are PrototypeProviders.
The asset created will have *no* propertygroups.
This *always* creates a prototype of the specific class.
most plugins want to call getPrototype(String typeid);
Parameters: assetClass - an LDM Asset class. |
createInstance | Asset createInstance(Asset prototypeAsset)(Code) | | Create an instance of a prototypical asset.
This variation does not add an ItemIdentificationCode
to the constructed asset instance. Without itemIDs,
multiple instances of a prototype will test as .equals(), and
can be confusing if they're added to the logplan.
Most users will find #createInstance(Asset, String) more convenient.
|
createInstance | Asset createInstance(String prototypeAssetTypeId)(Code) | | Create an instance of a prototypical asset.
This variation does not add an ItemIdentificationCode
to the constructed asset instance. Without itemIDs,
multiple instances of a prototype will test as .equals(), and
can be confusing if they're added to the logplan.
Most users will find #createInstance(String, String) more convenient.
|
createInstance | Asset createInstance(Asset prototypeAsset, String uniqueId)(Code) | | Create an instance of a prototypical asset, specifying an initial
UniqueID for its itemIdentificationPG .
|
createInstance | Asset createInstance(String prototypeAssetTypeId, String uniqueId)(Code) | | Create an instance of a prototypical asset, specifying an initial UniqueID
for its itemIdentificationPG.
|
createInstance | Asset createInstance(String prototypeAssetTypeId, int quantity)(Code) | | Create an aggregate asset instance of a prototypical asset.
|
createPropertyGroup | PropertyGroup createPropertyGroup(String propertyName)(Code) | | create a new property group, given a PropertyGroup name.
The name should not have any package prefix and should
be the cannonical name (not the implementation class name).
|
createPropertyGroup | PropertyGroup createPropertyGroup(Class propertyClass)(Code) | | create a new property group, given a PropertyGroupGroup name.
The name should not have any package prefix and should
be the cannonical name (not the implementation class name).
|
createPrototype | Asset createPrototype(String classname, String typeid)(Code) | | convenience routine for creating prototype assets.
does a createAsset followed by setting the TypeIdentification
to the specified string.
|
createPrototype | Asset createPrototype(Class assetclass, String typeid)(Code) | | convenience routine for creating prototype assets.
does a createAsset followed by setting the TypeIdentification
to the specified string.
|
createPrototype | Asset createPrototype(String classname, String typeid, String nomen)(Code) | | convenience routine for creating prototype assets.
does a createAsset followed by setting the TypeIdentification
and the nomenclature to the specified string.
|
getPrototype | Asset getPrototype(String aTypeName)(Code) | | Find a prototype Asset based on it's typeid description,
(e.g. "NSN/1234567890123") either by looking up an existing
object or by creating one of the appropriate type.
Shorthand for LDMServesPlugin.getPrototype(aTypeName);
|
|
|