Search in sources :

Example 21 with SimpleChain

use of com.netsteadfast.greenstep.base.chain.SimpleChain in project bamboobsc by billchen198318.

the class StrategyMapManagementAction method loadRecord.

private void loadRecord() throws ControllerException, ServiceException, Exception {
    if (StringUtils.isBlank(this.visionOid) || super.isNoSelectId(this.visionOid)) {
        throw new ControllerException(this.getText("MESSAGE.BSC_PROG002D0007Q_vision"));
    }
    Context context = this.getChainContext();
    SimpleChain chain = new SimpleChain();
    ChainResultObj resultObj = chain.getResultFromResource("strategyMapItemsForRecChain", context);
    this.setPageMessage(resultObj.getMessage());
    if (resultObj.getValue() instanceof StrategyMapItemsVO) {
        this.divItems = ((StrategyMapItemsVO) resultObj.getValue()).getDiv();
        this.cssItems = ((StrategyMapItemsVO) resultObj.getValue()).getCss();
        this.conItems = ((StrategyMapItemsVO) resultObj.getValue()).getCon();
    }
}
Also used : Context(org.apache.commons.chain.Context) ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) StrategyMapItemsVO(com.netsteadfast.greenstep.bsc.vo.StrategyMapItemsVO) ChainResultObj(com.netsteadfast.greenstep.base.model.ChainResultObj) SimpleChain(com.netsteadfast.greenstep.base.chain.SimpleChain)

Example 22 with SimpleChain

use of com.netsteadfast.greenstep.base.chain.SimpleChain in project bamboobsc by billchen198318.

the class StrategyMapManagementAction method loadNew.

private void loadNew() throws ControllerException, ServiceException, Exception {
    if (StringUtils.isBlank(this.visionOid) || super.isNoSelectId(this.visionOid)) {
        throw new ControllerException(this.getText("MESSAGE.BSC_PROG002D0007Q_vision"));
    }
    Context context = this.getChainContext();
    SimpleChain chain = new SimpleChain();
    ChainResultObj resultObj = chain.getResultFromResource("strategyMapItemsForNewChain", context);
    this.setPageMessage(resultObj.getMessage());
    if (resultObj.getValue() instanceof StrategyMapItemsVO) {
        this.divItems = ((StrategyMapItemsVO) resultObj.getValue()).getDiv();
        this.cssItems = ((StrategyMapItemsVO) resultObj.getValue()).getCss();
    }
}
Also used : Context(org.apache.commons.chain.Context) ControllerException(com.netsteadfast.greenstep.base.exception.ControllerException) StrategyMapItemsVO(com.netsteadfast.greenstep.bsc.vo.StrategyMapItemsVO) ChainResultObj(com.netsteadfast.greenstep.base.model.ChainResultObj) SimpleChain(com.netsteadfast.greenstep.base.chain.SimpleChain)

Example 23 with SimpleChain

use of com.netsteadfast.greenstep.base.chain.SimpleChain in project bamboobsc by billchen198318.

the class SwotContentQueryAction method getContent.

private void getContent() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    Context context = this.getChainContext();
    SimpleChain chain = new SimpleChain();
    ChainResultObj resultObj = chain.getResultFromResource("swotHtmlContentChain", context);
    this.body = String.valueOf(resultObj.getValue());
    this.message = resultObj.getMessage();
    if (!StringUtils.isBlank(this.body) && this.body.startsWith("<!-- BSC_PROG002D0008Q -->")) {
        this.success = IS_YES;
    }
}
Also used : Context(org.apache.commons.chain.Context) ChainResultObj(com.netsteadfast.greenstep.base.model.ChainResultObj) SimpleChain(com.netsteadfast.greenstep.base.chain.SimpleChain)

Example 24 with SimpleChain

use of com.netsteadfast.greenstep.base.chain.SimpleChain in project bamboobsc by billchen198318.

the class SwotContentQueryAction method getPdfDataContent.

private void getPdfDataContent() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    Context context = this.getChainContext();
    SimpleChain chain = new SimpleChain();
    ChainResultObj resultObj = chain.getResultFromResource("swotPdfDataContentChain", context);
    this.reportId = String.valueOf(resultObj.getValue());
    this.message = resultObj.getMessage();
    if (!StringUtils.isBlank(this.reportId)) {
        this.success = IS_YES;
    }
}
Also used : Context(org.apache.commons.chain.Context) ChainResultObj(com.netsteadfast.greenstep.base.model.ChainResultObj) SimpleChain(com.netsteadfast.greenstep.base.chain.SimpleChain)

Example 25 with SimpleChain

use of com.netsteadfast.greenstep.base.chain.SimpleChain in project bamboobsc by billchen198318.

the class KpiTreeJsonAction method loadTreeItems.

@SuppressWarnings("unchecked")
private void loadTreeItems() throws ServiceException, Exception {
    Context context = new ContextBase();
    context.put("http", this.getHttpServletRequest().getScheme() + "://");
    SimpleChain chain = new SimpleChain();
    ChainResultObj result = chain.getResultFromResource("kpiTreeItemsChain", context);
    this.message = super.defaultString(result.getMessage());
    if (result.getValue() != null && result.getValue() instanceof List) {
        this.items = (List<Map<String, Object>>) result.getValue();
    }
}
Also used : Context(org.apache.commons.chain.Context) ChainResultObj(com.netsteadfast.greenstep.base.model.ChainResultObj) SimpleChain(com.netsteadfast.greenstep.base.chain.SimpleChain) List(java.util.List) Map(java.util.Map) ContextBase(org.apache.commons.chain.impl.ContextBase)

Aggregations

SimpleChain (com.netsteadfast.greenstep.base.chain.SimpleChain)29 ChainResultObj (com.netsteadfast.greenstep.base.model.ChainResultObj)28 Context (org.apache.commons.chain.Context)28 ContextBase (org.apache.commons.chain.impl.ContextBase)8 List (java.util.List)5 Map (java.util.Map)5 ArrayList (java.util.ArrayList)4 LinkedHashMap (java.util.LinkedHashMap)4 BscStructTreeObj (com.netsteadfast.greenstep.bsc.model.BscStructTreeObj)3 StrategyMapItemsVO (com.netsteadfast.greenstep.bsc.vo.StrategyMapItemsVO)3 LinkedList (java.util.LinkedList)3 AppContext (com.netsteadfast.greenstep.base.AppContext)2 ControllerException (com.netsteadfast.greenstep.base.exception.ControllerException)2 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)2 VisionVO (com.netsteadfast.greenstep.vo.VisionVO)2 HashMap (java.util.HashMap)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 TimeSeriesAnalysisResult (com.netsteadfast.greenstep.bsc.model.TimeSeriesAnalysisResult)1 BbTsaMaCoefficients (com.netsteadfast.greenstep.po.hbm.BbTsaMaCoefficients)1 KpiVO (com.netsteadfast.greenstep.vo.KpiVO)1