The TypeModel command beans reside in com.ptc.core.command.common.bean.typemodel and are used for client access to the methods on the com.ptc.core.meta.type.runtime.server.TypeModel interface.
API
The available command beans are
Specific functionality for each bean is available in the javadoc for the com.ptc.core.command.common.bean.typemodel package. Each command performs the function of a single method on the TypeModel interface. There are four typemodel commands whose names don't exactly match there method names on the TypeModel interface, those are:
GetFilteredDescendantsCommand - corresponds to getDescendants(type_id : TypeIdentifier, interface_type_id : TypeIdentifier) : TypeIdentifier[] on the TypeModel.
GetFilteredInstantiableDescendantsCommand - corresponds to getInstantiableDescendants(type_id : TypeIdentifier, interface_type_id : TypeIdentifier) : TypeIdentifier[]
GetFilteredChildrenCommand - corresponds to getChildren(type_id : TypeIdentifier, interface_type_id : TypeIdentifier) : TypeIdentifier[]
GetFilteredInstantiableChildrenCommand - corresponds to getInstantiableChildren(type_id : TypeIdentifier, interface_type_id : TypeIdentifier) : TypeIdentifier[]
For each of the above apis the interface_type_id represents the "filter". For example, the GetFilteredDescendantsCommand will return an array of TypeIdentifiers containing all the types that are descendants of both the type_id and the interface_type_id.
The typemodel
command
delegates forward calls to the server side TypeModel
interface. There is 1 typemodel command delegate for each typemodel command
bean
When to Use
The typemodel command beans should be used by clients existing in common or client that want access to methods on the TypeModel interface.
How to Use
To use the typemodel command beans you need to
try {
GetDescendantsCommand
gdc = new GetDescendantsCommand();
gdc.setType_id(ti);
gdc = (GetDescendantsCommand)gdc.execute();
}
catch (CommandException ce )
{ce.printStackTrace();}
catch (WTPropertyVetoException wtve)
{wtve.printStackTrace();}