use of com.netsteadfast.greenstep.vo.SysWsConfigVO in project bamboobsc by billchen198318.
the class SystemWebServiceConfigLogicServiceImpl method update.
@ServiceMethodAuthority(type = { ServiceMethodType.UPDATE })
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = { RuntimeException.class, IOException.class, Exception.class })
@Override
public DefaultResult<SysWsConfigVO> update(SysWsConfigVO config, String systemOid) throws ServiceException, Exception {
if (config == null || super.isBlank(config.getOid()) || super.isBlank(systemOid)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
DefaultResult<SysWsConfigVO> oldResult = this.sysWsConfigService.findObjectByOid(config);
if (oldResult.getValue() == null) {
throw new ServiceException(oldResult.getSystemMessage().getValue());
}
SysVO sys = new SysVO();
sys.setOid(systemOid);
DefaultResult<SysVO> sResult = this.sysService.findObjectByOid(sys);
if (sResult.getValue() == null) {
throw new ServiceException(sResult.getSystemMessage().getValue());
}
sys = sResult.getValue();
config.setWsId(oldResult.getValue().getWsId());
config.setSystem(sys.getSysId());
if (super.defaultString(config.getDescription()).length() > MAX_DESCRIPTION_LENGTH) {
config.setDescription(config.getDescription().substring(0, MAX_DESCRIPTION_LENGTH));
}
return this.sysWsConfigService.updateObject(config);
}
use of com.netsteadfast.greenstep.vo.SysWsConfigVO in project bamboobsc by billchen198318.
the class SystemWsConfigSaveOrUpdateAction method save.
private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
SysWsConfigVO config = new SysWsConfigVO();
config.setPublishAddress(" ");
this.transformFields2ValueObject(config, new String[] { "wsId", "beanId", "type", "publishAddress", "description" });
DefaultResult<SysWsConfigVO> result = this.systemWebServiceConfigLogicService.create(config, this.getFields().get("systemOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.SysWsConfigVO 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();
}
}
use of com.netsteadfast.greenstep.vo.SysWsConfigVO in project bamboobsc by billchen198318.
the class SystemWsConfigSaveOrUpdateAction method delete.
private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
SysWsConfigVO config = new SysWsConfigVO();
this.transformFields2ValueObject(config, new String[] { "oid" });
DefaultResult<Boolean> result = this.systemWebServiceConfigLogicService.delete(config);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.SysWsConfigVO in project bamboobsc by billchen198318.
the class SystemWsConfigSaveOrUpdateAction method update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
SysWsConfigVO config = new SysWsConfigVO();
config.setPublishAddress(" ");
this.transformFields2ValueObject(config, new String[] { "oid", "wsId", "beanId", "type", "publishAddress", "description" });
DefaultResult<SysWsConfigVO> result = this.systemWebServiceConfigLogicService.update(config, this.getFields().get("systemOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
Aggregations