app = appInstance;
}
public CommonTemplate getCommonTemplate(String templateName) throws JIException {
JIVariant var = app.callMethodA("GetCommonTemplate", new JIVariant(templateName))[0];
CommonTemplate ct = null;
try {
OCSpreadsheetDocument sd = new OCSpreadsheetDocument(var);
sd.getHeader();
ct = sd;
} catch (JIException e) {
try {
OCTextDocument td = new OCTextDocument(var);
td.getLineSeparator();
ct = td;
} catch (JIException e1) {
ct = new CommonTemplate(var);
}
}
return ct;
}