Search in sources :

Example 16 with ControllerException

use of com.netsteadfast.greenstep.base.exception.ControllerException in project bamboobsc by billchen198318.

the class AnalyticsProcessAction method rendererHtmlExport.

private void rendererHtmlExport(File catalogFile) throws ControllerException, AuthorityException, ServiceException, Exception {
    this.rendererHtml(catalogFile);
    String datas = Pivot4JUtils.wrapRendererHtml(this.content);
    File file = null;
    try {
        file = new File(Constants.getWorkTmpDir() + "/" + super.getUuid() + ".htm");
        FileUtils.writeStringToFile(file, datas, Constants.BASE_ENCODING);
        this.oid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, true, file, "analytics-export.htm");
    } catch (Exception e) {
        throw e;
    } finally {
        file = null;
    }
}
Also used : File(java.io.File) ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) AuthorityException(com.netsteadfast.greenstep.base.exception.AuthorityException)

Example 17 with ControllerException

use of com.netsteadfast.greenstep.base.exception.ControllerException in project bamboobsc by billchen198318.

the class AnalyticsProcessAction method doHtmlExport.

/**
	 * qcharts.analyticsHtmlExportAction.action
	 * 
	 * @return
	 * @throws Exception
	 */
@JSON(serialize = false)
@ControllerMethodAuthority(programId = "QCHARTS_PROG002D0002Q")
public String doHtmlExport() throws Exception {
    File catalogFile = null;
    try {
        if (!this.allowJob()) {
            this.message = this.getNoAllowMessage();
            return SUCCESS;
        }
        this.rendererHtmlExport(catalogFile);
    } catch (AuthorityException | ControllerException | ServiceException e) {
        this.message = e.getMessage().toString();
    } catch (Exception e) {
        this.message = this.logException(e);
        this.success = IS_EXCEPTION;
    }
    catalogFile = null;
    return SUCCESS;
}
Also used : ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) File(java.io.File) AuthorityException(com.netsteadfast.greenstep.base.exception.AuthorityException) ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) AuthorityException(com.netsteadfast.greenstep.base.exception.AuthorityException) ControllerMethodAuthority(com.netsteadfast.greenstep.base.model.ControllerMethodAuthority) JSON(org.apache.struts2.json.annotations.JSON)

Aggregations

ControllerException (com.netsteadfast.greenstep.base.exception.ControllerException)17 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)10 AuthorityException (com.netsteadfast.greenstep.base.exception.AuthorityException)8 File (java.io.File)6 JSON (org.apache.struts2.json.annotations.JSON)4 ChainResultObj (com.netsteadfast.greenstep.base.model.ChainResultObj)3 ControllerMethodAuthority (com.netsteadfast.greenstep.base.model.ControllerMethodAuthority)3 SysUploadVO (com.netsteadfast.greenstep.vo.SysUploadVO)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 SimpleChain (com.netsteadfast.greenstep.base.chain.SimpleChain)2 StrategyMapItemsVO (com.netsteadfast.greenstep.bsc.vo.StrategyMapItemsVO)2 HashMap (java.util.HashMap)2 Context (org.apache.commons.chain.Context)2 IActionFieldsCheckUtils (com.netsteadfast.greenstep.base.model.IActionFieldsCheckUtils)1 SystemForm (com.netsteadfast.greenstep.base.model.SystemForm)1 BscStructTreeObj (com.netsteadfast.greenstep.bsc.model.BscStructTreeObj)1 ObjectiveVO (com.netsteadfast.greenstep.vo.ObjectiveVO)1 OlapCatalogVO (com.netsteadfast.greenstep.vo.OlapCatalogVO)1 OlapConfVO (com.netsteadfast.greenstep.vo.OlapConfVO)1 PerspectiveVO (com.netsteadfast.greenstep.vo.PerspectiveVO)1