|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.query.template.LoadReportTemplate
Creates and persists ReportTemplate objects based on input from a comma separated value
(csv) file. Method names and parameters are defined in csvmapfile.txt.
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
ExportReportTemplate
Field Summary | |
private static String |
DELEGATE_XSL
|
private static String |
LOAD_FILE_DIR
|
private static String |
REPLACE_OPTION
|
private static String |
RESOURCE
|
private static String |
URL_XSL
|
private static boolean |
VERBOSE
|
private static String |
WT_HOME
|
private static String |
XMLDir
|
Constructor Summary | |
LoadReportTemplate()
|
Method Summary | |
private static WTContainerRef |
createContainerReference(Hashtable nv,
Hashtable cmd_line,
String a_containerPath)
|
static ReportTemplate |
createReportTemplate(Hashtable nv,
Hashtable cmdLine)
|
static boolean |
createReportTemplate(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes "ReportTemplate" lines from a csv load file. |
static ReportTemplate |
createReportTemplate(String a_reportName,
String a_reportFolder,
String a_xmlFileName,
String a_containerPath,
Hashtable nv,
Hashtable cmdLine)
|
static String |
getValue(Hashtable nv,
String name,
boolean required)
|
private static DelegationXSLSpec |
loadDelegationXSL(Hashtable nv)
|
private static String |
loadFile(String file_name)
|
private static URLXSLSpec |
loadURLXSL(Hashtable nv)
|
static void |
main(String[] args)
Command line method for loading demonstration data into the Windchill system. |
private static void |
printMessage(String a_message)
|
static void |
setXMLDir(String a_xmlDir)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String DELEGATE_XSL
private static final String URL_XSL
private static final String LOAD_FILE_DIR
private static final String WT_HOME
private static final boolean VERBOSE
private static final String REPLACE_OPTION
private static String XMLDir
private static String RESOURCE
Constructor Detail |
public LoadReportTemplate()
Method Detail |
public static boolean createReportTemplate(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/Value pairs of Report Template attributes.
The attributes are as follows:
public static void setXMLDir(String a_xmlDir)
public static ReportTemplate createReportTemplate(Hashtable nv, Hashtable cmdLine) throws WTException
WTException
public static ReportTemplate createReportTemplate(String a_reportName, String a_reportFolder, String a_xmlFileName, String a_containerPath, Hashtable nv, Hashtable cmdLine) throws WTException
WTException
private static WTContainerRef createContainerReference(Hashtable nv, Hashtable cmd_line, String a_containerPath) throws WTException
WTException
private static DelegationXSLSpec loadDelegationXSL(Hashtable nv) throws WTPropertyVetoException, WTException
WTPropertyVetoException
WTException
private static URLXSLSpec loadURLXSL(Hashtable nv) throws WTPropertyVetoException, WTException
WTPropertyVetoException
WTException
private static String loadFile(String file_name) throws WTException
WTException
public static String getValue(Hashtable nv, String name, boolean required) throws WTException
WTException
private static void printMessage(String a_message)
public static void main(String[] args) throws Exception
args
- Not used anymore, ignored.
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |