C.2 Query Tag Library

The Query tag library contains functionality specific to the Operations Center application for querying against the performance engine. This tag library contains two tags: createQuery and performQuery. Use both tags together to retrieve information from Operations Center.

To reference this custom tags in the Operations Center tag library, add the following code to the top of the JSP file before the <html> tag:

<%@ taglib uri="http://www.managedobjects.com/taglibs/remote/query" prefix="query" %>

The following sections explain the tags:

C.2.1 createQuery

The createQuery tag creates a query to obtain information from Operations Center.

This tag is necessary to provide some constraints, requests, and expansions within the body of createQuery tag. Use the tags belonging to Constrain, Request, and Expand tag libraries.

The createQuery tag can be nested, if required, in order to create subqueries. It has the option of placing conditional code within the body of the tag.

For example:

  [provide constraints]
  [provide expansion]
  [provide requests]
  [perform query]

The createQuery tag alone cannot generate any required result. Use it to begin a query. This tag creates a HyperQuery object, which maintains java.util.Set objects for storing/queuing unique constraints, requests, and expansions. When any tags belonging to the Constrain, Request, and Expand tag libraries are inside the createQuery tag, objects pertaining to them are stored in the respective java.util.Set objects. A HyperQuery object is later used within the performQuery tag to obtain information from the performance engine.

C.2.2 performQuery

The performQuery tag performs or executes a query.

After performing a query against the performance engine, the performQuery tag internally maintains a list of HyperCube objects. Tags belonging to the Result tag libraries use these objects to manipulate information. Place the Result library tags within the body of the performQuery tag to obtain information. For example, the iterator tag iterates information provided by the performance engine.

Place any conditional code within the body of the tag. For example:

      <constrain:element name="<%=dname%>" />
      <constrain:time from='<%=""+start%>' to='<%=""+end%>' />
            <request:summaryState />
            <request:availability />
            <result:iterator id="test" >