The Index List class, OmIndexList, makes calls to the Index List Web Service.
Programs that use the OmIndexList class must include the following import statement in Java code:
import com.ca.omgmt.client.OmIndexList
Include the following import statement in Java code, if specifying the selection criteria:
import com.ca.omgmt.client.OmReportSelectionItem;
Constants
The following table describes the constants of the OmIndexList class:
Index List Request Type is CROSSREPORTINDEXNAMES.
Index List Request Type is CROSSREPORTINDEXVALUES.
Index List Request Type is INDEXNAMES.
Index List Request Type is INDEXVALUES.
Methods
The following table describes the methods of the OmIndexList class:
The default constructor for the class.
Parameters:None
The constructor for the class that sets the default timeout for requests.
Parameters:timeout: int
The constructor for the class that sets the default timeout for requests, path for the caching directory and cache threshold.
Parameter:timeout: int, cacheDirectory: String, cacheThreshold: int
Invokes the Index List Web Service using the parameters that are passed as input. The web service is accessed using port 8080 and the servername localhost.
Parameters:
userid: String
password:String
repository: String
returntype: String
requesttype: String
criteria: OmReportSelectionItem[]
asAttachment: Boolean
port: String (default value: "8080")
servername: String (default value: "localhost")
protocol: String (default value: "http", other value: "https" for HTTPS protocol)
Last three parameters (port, servername, and protocol) are optional and can be omitted.
Code Samples
The following code sample retrieves cross-report names for a repository as a string array (as Attachment is set to false):
OmIndexList indexlist = new OmIndexList();
OmReportSelectionItem[] byCriteriavalue = new OmReportSelectionItem[1];
byCriteria[0] = new OmReportSelectionItem("CRXNAME","*");
Object value;
value= indexlist.invoke("omuserid","ompwd","omrepository","stringarray", OmIndexList.CROSSREPORTNAMES,byCriteria,false,"8080","omwsserver");
The following code sample retrieves cross-report values for a cross-report index named "POLICY" as an attachment in XML format (as Attachment is set to true):
OmIndexList indexlist = new OmIndexList();
OmReportSelectionItem[] byCriteriavalue = new OmReportSelectionItem[2];
byCriteria[0] = new OmReportSelectionItem("CRXNAME","POLICY");
byCriteria[1] = new OmReportSelectionItem("CRXVALUE","*");
Object value;
value= indexlist.invoke("omuserid","ompwd","omrepository","xmlattachment", OmIndexList.CROSSREPORTVALUES,byCriteria,true,"8080","omwsserver");
|
Copyright © 2013 CA.
All rights reserved.
|
|