The Report List class, OmReportList, makes calls to the Report List Web Service.
Programs that use the OmReportList class must include the following import statement in Java code:
import com.ca.omgmt.client.OmReportList;
Include the following import statement in Java code, if specifying the selection criteria:
import com.ca.omgmt.client.OmReportSelectionItem;
Methods
The following list describes the methods of the OmReportList class:
The default constructor for the class.
Parameter:none
The constructor for the class that sets the default timeout for requests.
Parameter: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 Report List Web Service using the parameters that are passed as input.
Parameter:
userid: String
password:String
repository: String
returntype: String fields: 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 a report list for the report name and archive date attributes for reports beginning with c and returns data in a Java vector (Attachment that is set to false):
OmReportList reportlist = new OmReportList(); String[] fieldlist = {"RID", "ARCDATE"};
OmReportSelectionItem[] byCriteria = new OmReportSelectionItem[1];
byCriteria[0] = new OmReportSelectionItem("RID","C*");
Object value; value=reportlist.invoke("omuserid","ompwd","omrepository","vector",fieldlist,byCr iteria,false,
"8080","omwsserver");
The following code sample retrieves a report list for the report name, number of lines and number of pages attributes for text reports with one to 50 lines inclusive and returns data in an XML file attachment (as Attachment set to true):
OmReportList reportlist = new OmReportList(); String[] fieldlist = {"RID", "LINES","PAGES"}; OmReportSelectionItem[] byCriteria = new OmReportSelectionItem[2]; byCriteria [0] = new OmReportSelectionItem("LINES","1,50"); byCriteria [1] = new OmReportSelectionItem("DOC_TYPE","TEXT");
Object value; value=reportlist.invoke("omuserid","ompwd","omrepository","xmlattachment",fieldli st,byCriteria,true,
"8080","omwsserver");
|
Copyright © 2013 CA.
All rights reserved.
|
|