Creo Elements/Direct Model Manager Customization Guide > Java Extension > Java API > Creo Elements/Direct Model Manager internal architecture
Creo Elements/Direct Model Manager internal architecture
Introduction
This paper provides a high level overview of the Creo Elements/Direct Model Manager architecture. It is intended for people writing Java code to customize Creo Elements/Direct Model Manager or Creo Elements/Direct Drawing Manager. Creo Elements/Direct recommends using Creo Elements/Direct Model Manager out of the box, but provides this architectural information for customers and partners who need to customize the product.
This paper assumes that the reader has knowledge and sufficient understanding of Creo Elements/Direct Manager Server, Design Data Management or Desktop concepts, object-oriented concepts, and Java programming.
Creo Elements/Direct Model Manager and Creo Elements/Direct Drawing Manager use the same code. For the remainder of this document the application will be referred to as Creo Elements/Direct Model Manager, but the discussion is also valid for Creo Elements/Direct Drawing Manager and Creo Elements/Direct Model Manager running outside of Creo Elements/Direct Modeling.
High Level Creo Elements/Direct Model Manager Architecture
Creo Elements/Direct Model Manager is designed to allow customizations that support customized schemas. The architecture has a schema neutral layer requiring the schema to only support the minimal attributes required for Creo Elements/Direct Model Manager to provide its functionality. Creo Elements/Direct Model Manager allows all these attribute names to be mapped from their actual names.
Out-of-the-box Creo Elements/Direct Model Manager will work on a standard Design Data Management schema, as well as a standard Desktop schema. The degree and type of existing schema customization will determine the starting point of further customizations. Development (further customizations) for less customized deployments will likely begin from the Design Data Management or Desktop layers. If the deployment already contains substantial customizations, the programmer will be required to begin development at the more basic neutral data management (datamgmt) layer or even from the Creo Elements/Direct Manager Server base layer. Non CAD objects may start directly from the base Creo Elements/Direct Manager Server objects.
At the lowest level, or layer, of the Creo Elements/Direct Model Manager Architecture are the base Creo Elements/Direct Manager Server objects. The CAD application provides the CAD data management objects, such as Model, Part, and Drawing.
The Design Data Management and Desktop implementations extend from this layer. Design Data Management and Desktop objects specifically support those applications’ schemas. The shadowed boxes represent where different degrees of customizations are built in this architectural view.
The Creo Elements/Direct Manager Server layer includes implementations for $DOC (WMDoc), $PARTDESC (WMPart), $PACKET (WMPacket), etc. The data management (datamgmt) layer extends objects from the Creo Elements/Direct Manager Server layer to provide implementations for objects for managing CAD application data. For example, this layer includes objects for Models, Drawings, Change notes, Parts, etc.
The Design Data Management and Desktop areas provide objects that are built from the objects in the data management layer but are specific to the Design Data Management or Desktop schemas. For example, the Data Management layer implements a DMModel3D object that understands all the attributes of the Design Data Management MODEL_3D database class. The Desktop layer implements a DTModel object that understands all the attributes of the me_model database class.
Creo Elements/Direct Manager Server Class Hierarchy Overview
Creo Elements/Direct Manager Server is the foundation for the CAD application data management objects. It implements the basic concepts of documents, parts, and relationships. However, it does not provide the semantics of Models, Drawings, Change notes, etc.
Readers should be familiar with Creo Elements/Direct Manager Server and Creo Elements/Direct products built on Creo Elements/Direct Manager Server. Creo Elements/Direct Manager Server provides documents, parts, packets, forms, generals, and notes. It also provides the concept of structure by managing parent/child relations between these basic elements. In addition, Creo Elements/Direct Manager Server provides basic system concepts, users, groups, and permissions (authentication and authorizations).
The class hierarchy of the base Creo Elements/Direct Manager Server objects is diagrammed below. This is not a complete representation of all the classes; only classes commonly used to implement or extend Creo Elements/Direct Model Manager are shown.
At the top is Object, the root of all classes in Java. WMObject is the most basic Creo Elements/Direct Manager Server object. It introduces the idea of structure by defining the getChildren() method, which returns a list of immediate children of a parent object. For example, the children of an assembly are all the parts and sub assemblies inside that parent assembly. In addition, the WMObject defines methods such as getObjHandle (the cacheID), getObjName (the display name of the object) and close (the method that drops the cacheID).
Various Creo Elements/Direct Manager Server Objects, such as WMLtab, WMQuery and WMTransaction, extend from WMObject. These objects implement ltabs, queries and transactions.
WMDBObject is the top of the class hierarchy for all objects that have attribute values that are stored in the database. It implements setting and getting values from the Creo Elements/Direct Manager Server cache. WMDBObject is the object that calls the getters and setters for attributes in business objects using Java reflection. When an attribute’s value is being read or written, WMDBObject looks for a method with the attribute’s name, prefixed with the string ‘get’ or ‘set’. If such a method exists, the method is called to allow the business logic to manage the actual reading or updating the attribute’s value.
There are two class hierarchy branches under WMDBObject, one for WMMainObject and one for WMSubObject. WMMainObjects are objects that implement the apply() method to apply their values to the database. For example, all the base Creo Elements/Direct Manager Server elements ($DOC, $PARTDESC, $PACKET, $GENERAL, $FORM, and $NOTE).
WMSubObjects are related to WMMainObjects. However, they are applied to the database as a side effect of applying their associated WMMainObject. For example, element links (ele links), files associated to document ($DOC) elements, etc.
As noted, the Creo Elements/Direct Manager Server WMElement object extends WMMainObject. The WMElement object implements the concept of element structure and manages the links between elements. The six Creo Elements/Direct Manager Server element types ($DOC, $PARTDESC, $PACKET, $GENERAL, $FORM, and $NOTE) all extend WMElement.
WMSystemMainObject also inherits from WMMainObject. WMSystemMainObject is the root of all the Creo Elements/Direct Manager Server System objects (e.g., users, groups, data dictionaries, etc.).
WMSession is a very special Creo Elements/Direct Manager Server object. It is a singleton object (i.e., there is one and only one instance of a WMSession when Creo Elements/Direct Model Manager is running) that represents a particular user’s Creo Elements/Direct Manager Server Session. It is a factory object and has methods to create or open all other Creo Elements/Direct Manager Server objects — for example, openElement(…), newElement(…), newLtab(…). Whenever a Creo Elements/Direct Manager Server object is opened or created, the WMSession object looks up the business object class registered for that object in the xml configuration file, and then creates and returns an instance of that business object. Customizers can provide custom business logic for an object by extending the object’s implementation provided by Creo Elements/Direct Model Manager and registering the new business object classes in the xml file.
Data Management (datamgmt) Layer
The data management (datamgmt) layer implements the classes to manage CAD data, without requiring a specific database schema. No specific database class names or attribute names are required.
The data management layer implements the concepts of model assembly and part structures, Drawings and their relationship to the models and parts, versioning, and change notes. The data management layer also understands how to load and store this information to and from the CAD applications.
The diagram below shows the class hierarchy of the important classes in the data management layer.
The two top objects, Doc and Part, extend the WMDoc and WMPart objects provided by the Creo Elements/Direct Manager Server layer.
VersionableDoc extends Doc and manages the versioning behaviors of documents. It is the implementation which allows for and creates new versions of a document, as well as locating all versions, highest versions, and highest released versions of a document. It provides load rule implementations for loading different versions of documents and their structures into the CAD applications. Since change notes are usually created when documents are versioned, VersionableDoc also manages creating and relating change notes to a version of a document.
DocWithPart manages the document to part relationships. Models or Drawings may represent many parts and a part may have many Models or Drawings. It also implements loading a specific part record into the CAD application, and creating and modifying part records when storing from the CAD application.
DocWithPart is also where BOM Editor is implemented. This includes scanning BOM structures from the model structures or part structures from Creo Elements/Direct Drafting. It also manages the history of BOM structures and it creates the consolidated and structure BOM reports.
At the bottom of the class hierarchy are the actual CAD objects; Model, Drawing, Package3D, and Library. These objects are used by the Design Data Management and Desktop layers to manage the actual data stored in the database.
Design Data Management and Desktop Layers
The Design Data Management and Desktop Layers inherit from the datamgmt layer to manage the concrete classes in the database. These layers expect a specific database schema, they expect specific class names to hold the model, drawing, and part data and expect these classes to have specific attribute names. However, these objects inherit all their complex behaviors from the datamgmt layer (e.g., loading, storing, versioning, structure management, etc.)
The class hierarchy for these layers is relatively simple. The two diagrams below describe these hierarchies and show which objects extend which objects from the datamgmt layer.
Customizations Layers
As noted, CAD object customizations may be implemented by extending objects from the Design Data Management, Desktop, or the datamgmt layers depending on the solution requirements. If a customer has a schema that is very close to the out-of-the-box Design Data Management or Desktop schema it will probably be easiest to extend from the Design Data Management or Desktop layers. However, if the customer has a schema that differs greatly from the out-of-the-box schemas it may be easiest to extend directly from the datamgmt layer objects.
If customers manage non CAD objects, such as other design documents, the customizations might need to extend directly from the objects in the Creo Elements/Direct Manager Server layer.
Was this helpful?