use of com.netsteadfast.greenstep.vo.SysFormMethodVO in project bamboobsc by billchen198318.
the class SystemFormMethodSaveOrUpdateAction method update.
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields();
SysFormMethodVO method = new SysFormMethodVO();
method.setExpression(this.getFields().get("expression").getBytes());
this.transformFields2ValueObject(method, new String[] { "oid", "name", "resultType", "type", "description" });
DefaultResult<SysFormMethodVO> result = this.systemFormLogicService.updateMethod(method, this.getFields().get("formOid"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.SysFormMethodVO in project bamboobsc by billchen198318.
the class SystemFormMethodSaveOrUpdateAction method copy2Upload.
private void copy2Upload() throws ControllerException, AuthorityException, ServiceException, Exception {
SysFormMethodVO formMethod = new SysFormMethodVO();
this.transformFields2ValueObject(formMethod, new String[] { "oid" });
DefaultResult<SysFormMethodVO> result = this.sysFormMethodService.findObjectByOid(formMethod);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
formMethod = result.getValue();
this.uploadOid = UploadSupportUtils.create(Constants.getSystem(), UploadTypes.IS_TEMP, false, formMethod.getExpression(), formMethod.getFormId() + "_" + formMethod.getName() + "." + formMethod.getType());
this.message = SysMessageUtil.get(GreenStepSysMsgConstants.INSERT_SUCCESS);
this.success = IS_YES;
}
use of com.netsteadfast.greenstep.vo.SysFormMethodVO in project bamboobsc by billchen198318.
the class SystemFormMethodSaveOrUpdateAction method updateExpression.
private void updateExpression() throws ControllerException, AuthorityException, ServiceException, Exception {
String expression = this.getFields().get("expression");
if (StringUtils.isBlank(expression)) {
super.throwMessage("Expression is required!");
}
SysFormMethodVO formMethod = new SysFormMethodVO();
this.transformFields2ValueObject(formMethod, new String[] { "oid" });
DefaultResult<SysFormMethodVO> result = this.systemFormLogicService.updateMethodExpressionOnly(formMethod, expression);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
Aggregations