Search in sources :

Example 31 with SysVO

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

the class SystemMessageNoticeConfigManagementAction method loadSysMsgNoticeConfigData.

private void loadSysMsgNoticeConfigData() throws ServiceException, Exception {
    this.transformFields2ValueObject(this.sysMsgNoticeConfig, new String[] { "oid" });
    DefaultResult<SysMsgNoticeConfigVO> result = this.sysMsgNoticeConfigService.findObjectByOid(sysMsgNoticeConfig);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    sysMsgNoticeConfig = result.getValue();
    SysVO sys = new SysVO();
    sys.setSysId(sysMsgNoticeConfig.getSystem());
    DefaultResult<SysVO> sysResult = this.sysService.findByUK(sys);
    if (sysResult.getValue() != null) {
        this.selectValue = sysResult.getValue().getOid();
    }
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysMsgNoticeConfigVO(com.netsteadfast.greenstep.vo.SysMsgNoticeConfigVO) SysVO(com.netsteadfast.greenstep.vo.SysVO)

Example 32 with SysVO

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

the class SystemTwitterManagementAction method loadSysTwitterData.

private void loadSysTwitterData() throws ServiceException, Exception {
    sysTwitter.setOid(this.getFields().get("oid"));
    DefaultResult<SysTwitterVO> result = this.sysTwitterService.findObjectByOid(sysTwitter);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    this.sysTwitter = result.getValue();
    this.getFields().put("content", new String(this.sysTwitter.getContent(), "utf8"));
    SysVO sys = new SysVO();
    sys.setSysId(this.sysTwitter.getSystem());
    DefaultResult<SysVO> sysResult = this.sysService.findByUK(sys);
    if (sysResult.getValue() == null) {
        throw new ServiceException(sysResult.getSystemMessage().getValue());
    }
    sys = sysResult.getValue();
    this.getFields().put("systemOid", sys.getOid());
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysVO(com.netsteadfast.greenstep.vo.SysVO) SysTwitterVO(com.netsteadfast.greenstep.vo.SysTwitterVO)

Example 33 with SysVO

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

the class SystemTwitterSaveOrUpdateAction method save.

private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    SysVO sys = this.findSys();
    SysTwitterVO sysTwitter = new SysTwitterVO();
    sysTwitter.setSystem(sys.getSysId());
    sysTwitter.setTitle(this.getFields().get("title"));
    sysTwitter.setEnableFlag(("true".equals(this.getFields().get("enableFlag")) ? YesNo.YES : YesNo.NO));
    sysTwitter.setContent(this.getFields().get("content").getBytes());
    DefaultResult<SysTwitterVO> result = this.sysTwitterService.saveObject(sysTwitter);
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null) {
        this.success = IS_YES;
    }
}
Also used : SysVO(com.netsteadfast.greenstep.vo.SysVO) SysTwitterVO(com.netsteadfast.greenstep.vo.SysTwitterVO)

Example 34 with SysVO

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

the class SystemTwitterSaveOrUpdateAction method findSys.

private SysVO findSys() throws ServiceException, Exception {
    SysVO sys = new SysVO();
    sys.setOid(this.getFields().get("systemOid"));
    DefaultResult<SysVO> result = this.sysService.findObjectByOid(sys);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    sys = result.getValue();
    return sys;
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysVO(com.netsteadfast.greenstep.vo.SysVO)

Example 35 with SysVO

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

the class SystemWsConfigManagementAction method loadSysWsConfigData.

private void loadSysWsConfigData() throws ServiceException, Exception {
    this.transformFields2ValueObject(this.sysWsConfig, new String[] { "oid" });
    DefaultResult<SysWsConfigVO> result = this.sysWsConfigService.findObjectByOid(sysWsConfig);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    this.sysWsConfig = result.getValue();
    SysVO sys = new SysVO();
    sys.setSysId(this.sysWsConfig.getSystem());
    DefaultResult<SysVO> sResult = this.sysService.findByUK(sys);
    if (sResult.getValue() != null) {
        this.selectValue = sResult.getValue().getOid();
    }
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysWsConfigVO(com.netsteadfast.greenstep.vo.SysWsConfigVO) SysVO(com.netsteadfast.greenstep.vo.SysVO)

Aggregations

SysVO (com.netsteadfast.greenstep.vo.SysVO)35 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)30 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)13 Transactional (org.springframework.transaction.annotation.Transactional)13 JsonParseException (com.fasterxml.jackson.core.JsonParseException)7 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)7 TbSys (com.netsteadfast.greenstep.po.hbm.TbSys)6 ISysService (com.netsteadfast.greenstep.service.ISysService)6 SysExpressionVO (com.netsteadfast.greenstep.vo.SysExpressionVO)3 HashMap (java.util.HashMap)3 SysCtxBeanVO (com.netsteadfast.greenstep.vo.SysCtxBeanVO)2 SysExprJobVO (com.netsteadfast.greenstep.vo.SysExprJobVO)2 SysIconVO (com.netsteadfast.greenstep.vo.SysIconVO)2 SysMsgNoticeConfigVO (com.netsteadfast.greenstep.vo.SysMsgNoticeConfigVO)2 SysTwitterVO (com.netsteadfast.greenstep.vo.SysTwitterVO)2 SysWsConfigVO (com.netsteadfast.greenstep.vo.SysWsConfigVO)2 TbSysIcon (com.netsteadfast.greenstep.po.hbm.TbSysIcon)1 SysBeanHelpVO (com.netsteadfast.greenstep.vo.SysBeanHelpVO)1 SysProgVO (com.netsteadfast.greenstep.vo.SysProgVO)1 Map (java.util.Map)1