Hi there,
we would like to write a CAI application which can create CIS projects and also publish automatically CAI layouts.
Is there any method/class which we can use to do automatical publishing of a CAI Layout ?
Is there any method/class which we can use to create a new CAI project?
Sorry for asking, if this is provided in the documentation somewhere.
Could not find it yet though…
Thanks for any help.
Ok, what I have found is a class called
com.softwareag.cis.gui.generate.HTMLGenerator
HTMLGenerator htmlGenerator = new HTMLGenerator();
htmlGenerator.generateHTMLFile( getOutputFolder() +“\”+layout_Name_xml,
getOutputFolder()+“\”+getLayoutName()+“.html”,
“C:\log.txt”,
getOutputFolder()+“\accesspath\”+getLayoutName()+“.access”);
Do not know if this is right approach, would feel more comfortable,
if some of the CAI guys would give their blessings on the approach…
Thanks in advance.
What about project creation although?`
hjo
(hjo)
April 11, 2006, 9:27pm
3
Do you also know the class HTMLGeneratorWholeDirectory? In my opinion, it’s easier to use.
Perhaps this can help you. You can find further information in the javadoc.
…little remark: best choose the HTMLGenerator’s main method. Javadoc tells about the paramters.
Ad jho: this is exactly the right approach, e.g. for nightly ANT procedures.
Bjoern
I used the main method like this, but I don’t get the SWT Part of generation.
Coudl not find in main method documentation what to pass over to get the SWT stuff:
String publishingParameterList = new String[5];
publishingParameterList[0] = getOutputFolder()+ “\xml\” + layout_Name_xml;
publishingParameterList[1] = getOutputFolder()+“\”+ getLayoutName() + “.html”;
publishingParameterList[2] = getOutputFolder()+ “\publishing.log”;
publishingParameterList[3] = getOutputFolder()+“\accesspath\”+ getLayoutName()+“.access”;
publishingParameterList[4] = “false”;
/* Documentation from API:
String1 = XML file
String2 = HTML file
String3 = LOG file
String4 = ACCESS file
String5 = true/false in order to control if to create the HTML in a size optimized (but unreadable) way
*/
HTMLGenerator.main(publishingParameterList);
…oops, you are right: there is an undocumented 6th parameter, guess what it is!
Some internal program of ours as sample:
HTMLGenerator.main(new String[]
{
xmlDir + xmlFiles[i],
htmlDir + fileWOEXT + ".html",
logDir + fileWOEXT + ".log",
accessDir + fileWOEXT + ".access",
"true",
htmlDir + fileWOEXT + "_SWT.xml"
});
Bjoern