|
|
(16 intermediate revisions by the same user not shown) |
Line 20: |
Line 20: |
| | | |
| == Outline == | | == Outline == |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
| | | |
| | | |
| == Content == | | == Content == |
| | | |
− | | + | The content of this document has been merged with http://wiki.eclipse.org/COSMOS_DG_Constructing_a_Data_Manager |
− | | + | |
− | = Providing CMDBf Query Support =
| + | |
− | | + | |
− | As described in the previous section, the [http://www.cmdbf.org CMDBf specification] defines a query and a registration service. COSMOS provides a set of reusable, extensible classes and interfaces that can be utilized in implementing such services. This section will cover how COSMOS APIs can be used in providing a CMDBf query implementation for the Student-Teacher example.
| + | |
− | | + | |
− | | + | |
− | == Architecture ==
| + | |
− | | + | |
− | The process of handling a CMDBf query involves traversing a structure representing the request, processing each individual part, and generating a structure representing the result. COSMOS has already defined structures representing the request and response. There is also generic code in place for traversing the request and invoking handlers for individual part of the CMDBf request. A consumer needs to only provide implementation of such handlers as part of implementing the query service. | + | |
− | | + | |
− | A handler is required to process each CMDBf query constraint that an implementation supports. In addition to constraint handlers, the framework also requires two handlers for item templates and relationship templates. Here's the order in which the handlers are invoked:
| + | |
− | | + | |
− | # Item/Relationship template handler
| + | |
− | # Instance id constraint handler
| + | |
− | # Record type constraint handler
| + | |
− | # Property value constraint handler
| + | |
− | | + | |
− | OR
| + | |
− | | + | |
− | # Item/Relationship template handler
| + | |
− | # XPath constraint handler
| + | |
− | | + | |
− | It is the responsibility of the handler factory class to create instances of each handler above. The MDR toolkit automatically generates a handler factory. See src/org.eclipse.cosmos.example.mdr.handlers.QueryHandlerFactory.java for the class generated.
| + | |
− | | + | |
− | == Creating Query Handlers ==
| + | |
− | | + | |
− | This sample
| + | |
| | | |
| [[Category:COSMOS_Development_Guide]] | | [[Category:COSMOS_Development_Guide]] |
Latest revision as of 11:44, 2 June 2008
COSMOS Wiki > COSMOS Document Plan > COSMOS Manual Guide
COSMOS Development Guide Providing CMDBf Query and Registration Services
Category: Development Guide
Outline
Content
The content of this document has been merged with http://wiki.eclipse.org/COSMOS_DG_Constructing_a_Data_Manager