Search in sources :

Example 6 with SysBeanHelpVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpVO in project bamboobsc by billchen198318.

the class ServiceScriptExpressionUtils method loadSysBeanHelperData.

private static SysBeanHelpVO loadSysBeanHelperData(String beanId, String methodName, String system) throws ServiceException, Exception {
    SysBeanHelpVO beanHelp = new SysBeanHelpVO();
    beanHelp.setBeanId(beanId);
    beanHelp.setMethod(methodName);
    beanHelp.setSystem(system);
    DefaultResult<SysBeanHelpVO> result = sysBeanHelpService.findByUK(beanHelp);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    beanHelp = result.getValue();
    return beanHelp;
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysBeanHelpVO(com.netsteadfast.greenstep.vo.SysBeanHelpVO)

Example 7 with SysBeanHelpVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpVO in project bamboobsc by billchen198318.

the class SystemBeanHelpSaveOrUpdateAction method update.

private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    SysBeanHelpVO beanHelp = new SysBeanHelpVO();
    this.transformFields2ValueObject(beanHelp, new String[] { "oid", "beanId", "method", "description" });
    beanHelp.setEnableFlag(YesNo.NO);
    if ("true".equals(this.getFields().get("enableFlag"))) {
        beanHelp.setEnableFlag(YesNo.YES);
    }
    DefaultResult<SysBeanHelpVO> result = this.systemBeanHelpLogicService.update(beanHelp, this.getFields().get("systemOid"));
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null) {
        this.success = IS_YES;
    }
}
Also used : SysBeanHelpVO(com.netsteadfast.greenstep.vo.SysBeanHelpVO)

Example 8 with SysBeanHelpVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpVO in project bamboobsc by billchen198318.

the class SystemBeanHelpSaveOrUpdateAction method delete.

private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
    SysBeanHelpVO beanHelp = new SysBeanHelpVO();
    this.transformFields2ValueObject(beanHelp, new String[] { "oid" });
    DefaultResult<Boolean> result = this.systemBeanHelpLogicService.delete(beanHelp);
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null && result.getValue()) {
        this.success = IS_YES;
    }
}
Also used : SysBeanHelpVO(com.netsteadfast.greenstep.vo.SysBeanHelpVO)

Aggregations

SysBeanHelpVO (com.netsteadfast.greenstep.vo.SysBeanHelpVO)8 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)3 SysExpressionVO (com.netsteadfast.greenstep.vo.SysExpressionVO)2 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)1 TbSysBeanHelpExpr (com.netsteadfast.greenstep.po.hbm.TbSysBeanHelpExpr)1 TbSysBeanHelpExprMap (com.netsteadfast.greenstep.po.hbm.TbSysBeanHelpExprMap)1 SysVO (com.netsteadfast.greenstep.vo.SysVO)1 Transactional (org.springframework.transaction.annotation.Transactional)1