Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CMDBf Query Builder Dialog

Revision as of 11:38, 7 March 2008 by Sleeloy.ca.ibm.com (Talk | contribs) (CMDBf Query Builder Dialog)

COSMOS Wiki > COSMOS Document Plan > COSMOS Manual Guide > COSMOS_UG_Web_Component_Library

CMDBf Query Builder Dialog

Purpose: This web based component provides a dialog box to construct a CMDBf query document and submit the constructed document to a MDR. Users familiar with the CMDBf query document structure can use this dialog box to construct a CMDBf query document instead of hand typing the document. The query builder processes the service meta data from an MDR to determine what kind of query capabilities the user is allowed to specify.

Cosmos exambuilder.jpg

Application can configure the Data Manager Navigator component to show this dialog box by selecting the "Submit a Query" menu option. Typically, the user would right-click the MDR he/she wants to submit a query to. This would bring up a pop-up menu with an option to "Submit a Query".

The query builder is composed of three panes. The top level pane manages the <itemTemplate> and <relationshipTemplate> nodes of a CMDBf query document. Users can add and remove itemTemplate and relationshipTemplate nodes within this pane. The top level nodes in the tree shows the list of itemTemplates defined in the query. <relationshipTemplate> nodes are defined as children nodes of an <itemTemplate>. Adding a <relationshipTemplate> underneath an <itemTemplate> node indicates that the parent node of the <relationshipTemplate> is the source template and the child node of the <relationshipTemplate> is the target template. Consider the following screen capture.

Cosmos buildertop.jpg

The above picture illustrates a query that has two <itemTemplate> nodes. The first <itemTemplate> has an id set to "user" while the second <itemTemplate> has an id set to "computer". The pane further shows that a <relationshipTemplate> is defined where the source template node is the "user" and the target template node is the "computer". Furthremore, the name of the "relationsihpTemplate" is set to "usage".

To add an <itemTemplate> the user can right click the "query" node in the top pane and select 'Add Item'. A dialog box will prompt the user to enter the id of the <itemTemplate>. To add a <relationshipTemplate> the user can right click an <itemTemplate> node and select 'Add Relationship'. This will prompt the user with a dialog box that will allow the user to enter the id of the <relationshipTemplate> and the id of the target template. Note that a drop down box is provided that lists existing 'itemTemplates'. The user should note that if the MDR does not support queries that include <relationshipTemplate> nodes the user will not have the ability to add <relationshipTemplate> nodes.

The bottom left pane manages the structure of an <itemTemplate> or <relationshipTemplate> element that is selected in the top pane. The user can add query capabilities to these elements. The types of capabilities that the user can add is dictated by what is supported in the service meta data provided by the MDR. The user can right click the top level node to add a particular query capability as shown below:

Cosmos builderleft.jpg

The user can add or remove capabilities within this pane. As the user adds capabilities under either an <itemTemplate> or <relationshipTemplate> they are building the XML structure of the <itemTemplate> or <relationshipTemplate> element. Consider the following illustration.

Cosmos leftrecordConstraint.jpg

The above tree structure would produce the following XML structure under the <itemTemplate> element.

   <s:itemTemplate id="user" suppressFromResult="false" >
      <s:recordConstraint >
         <s:recordType namespace="" localName="" >
         </s:recordType>
      </s:recordConstraint>

At any point the user can preview the CMDB query document by clicking the "Preview XML" button. A popup box will display the XML document that represents the query as shown below.

Cosmos previewxml.jpg

Once the user is done creating the query document they would click on the "Submit" button to send the document to the MDR.

Once the user submits the a node is added under the selected MDR that represents the query.

Cosmos submitted.jpg

Back to the top