Class LoadReportTemplate
wt.load.StandardLoadService.load reads records from a .csv file
and passes the fields in a hashtable to methods defined in this class.
These methods then create and persist part objects.
The standalone version will use csvmapfile.txt and the .csv file will be loaded from command line as specified below:
The replace option "-replace" can be used to update existing reports if they exist. If the report exists, then all attributes are set (except for folder location) and the object is updated. If the report does not exist, then the normal create is done.
Standalone Usages:
java wt.query.template.LoadReportTemplate (default path)
java wt.query.template.LoadReportTemplate c:\loadReports.csv (absolute path)
java wt.query.template.LoadReportTemplate loadReports.csv (relative path)
java wt.query.template.LoadReportTemplate c:\loadReports.csv -replace (absolute path with replace)
XML File:
Within the .csv file specify the XML source with an absolute path or the default directory will be searched (wt.loadFiles.reports). Also if the folder to store the reports in does not exist, one will be created.
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancreateReportTemplate(Hashtable nv, Hashtable cmd_line, Vector return_objects) Processes "ReportTemplate" lines from a csv load file.
-
Method Details
-
createReportTemplate
Processes "ReportTemplate" lines from a csv load file. Creates a new ReportTemplate using the attributes contained in the Hashtable parameter.- Parameters:
nv- Name/Value pairs of Report Template attributes. The attributes are as follows:- command(ReportTemplate)
- folder
- name(Report Template name)
- description
- xml(file location)
- xslType(DEL, URL or empty)
- service(HTML, XML, CSV.....)
- containerPath( example - /wt.inf.container.OrgContainer=DefaultOrg/wt.inf.container.ClassicContainer=Classic)
- url1(required for xslType = URL)
- url2
- update (This is just added for Import/Export Functionality of Reports. Will not be the part of loader file....)
- xmlFileCharset (This is optional. The default is UTF-8.)
Supported API: true
-