use of com.netsteadfast.greenstep.vo.OlapConfVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method rendererHtml.
private void rendererHtml(File catalogFile) throws ControllerException, AuthorityException, ServiceException, Exception {
this.content = "";
this.checkFields("query");
boolean showDimensionTitle = true;
boolean showParentMembers = true;
if (!"true".equals(this.getFields().get("showDimensionTitle"))) {
showDimensionTitle = false;
}
if (!"true".equals(this.getFields().get("showParentMembers"))) {
showParentMembers = false;
}
OlapCatalogVO catalog = this.loadOlapCatalog(this.getFields().get("catalogOid"));
OlapConfVO config = this.loadOlapConfig(this.getFields().get("configOid"));
catalogFile = OlapUtils.writeCatalogContentToFile(catalog.getId() + "_" + super.getAccountOid(), new String(catalog.getContent(), Constants.BASE_ENCODING));
String mondrianUrl = OlapUtils.getMondrianUrl(config.getJdbcUrl(), config.getJdbcDrivers(), catalogFile.getPath());
this.content = Pivot4JUtils.rendererHtml(mondrianUrl, this.getFields().get("expression"), showDimensionTitle, showParentMembers);
this.message = this.getText("MESSAGE.QCHARTS_PROG002D0002Q_msg1") + super.getHtmlBr();
this.success = IS_YES;
}
use of com.netsteadfast.greenstep.vo.OlapConfVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method loadOlapConfig.
private OlapConfVO loadOlapConfig(String oid) throws ServiceException, Exception {
OlapConfVO conf = new OlapConfVO();
conf.setOid(oid);
DefaultResult<OlapConfVO> result = this.olapConfService.findObjectByOid(conf);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
conf = result.getValue();
return conf;
}
use of com.netsteadfast.greenstep.vo.OlapConfVO in project bamboobsc by billchen198318.
the class AnalyticsProcessAction method exportExcel.
private void exportExcel(File catalogFile) throws ControllerException, AuthorityException, ServiceException, Exception {
this.oid = "";
this.checkFields("query");
boolean showDimensionTitle = true;
boolean showParentMembers = true;
if (!"true".equals(this.getFields().get("showDimensionTitle"))) {
showDimensionTitle = false;
}
if (!"true".equals(this.getFields().get("showParentMembers"))) {
showParentMembers = false;
}
OlapCatalogVO catalog = this.loadOlapCatalog(this.getFields().get("catalogOid"));
OlapConfVO config = this.loadOlapConfig(this.getFields().get("configOid"));
catalogFile = OlapUtils.writeCatalogContentToFile(catalog.getId() + "_" + super.getAccountOid(), new String(catalog.getContent(), Constants.BASE_ENCODING));
String mondrianUrl = OlapUtils.getMondrianUrl(config.getJdbcUrl(), config.getJdbcDrivers(), catalogFile.getPath());
File file = null;
try {
file = Pivot4JUtils.exportExcelFile(mondrianUrl, this.getFields().get("expression"), showDimensionTitle, showParentMembers);
this.oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, true, file, "analytics-export.xlsx");
} catch (Exception e) {
throw e;
} finally {
file = null;
}
this.message = this.getText("MESSAGE.QCHARTS_PROG002D0002Q_msg1") + super.getHtmlBr();
this.success = IS_YES;
}
use of com.netsteadfast.greenstep.vo.OlapConfVO in project bamboobsc by billchen198318.
the class AnalyticsConfigSaveOrUpdateAction method save.
private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
OlapConfVO olapConf = new OlapConfVO();
this.transformFields2ValueObject(olapConf, new String[] { "id", "name", "jdbcDrivers", "jdbcUrl", "description" });
DefaultResult<OlapConfVO> result = this.analyticsConfigLogicService.create(olapConf);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
Aggregations