use of com.netsteadfast.greenstep.vo.SysFormTemplateVO in project bamboobsc by billchen198318.
the class SystemFormUtils method findTemplate.
public static SysFormTemplateVO findTemplate(String templateId) throws ServiceException, Exception {
SysFormTemplateVO template = new SysFormTemplateVO();
template.setTplId(templateId);
DefaultResult<SysFormTemplateVO> result = sysFormTemplateService.findByUK(template);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
template = result.getValue();
//this.writePage(template);
return template;
}
use of com.netsteadfast.greenstep.vo.SysFormTemplateVO in project bamboobsc by billchen198318.
the class SystemFormTemplateSaveOrUpdateAction method updateContent.
private void updateContent() throws ControllerException, AuthorityException, ServiceException, Exception {
SysFormTemplateVO template = new SysFormTemplateVO();
this.transformFields2ValueObject(template, new String[] { "oid" });
DefaultResult<SysFormTemplateVO> result = this.systemFormLogicService.updateTemplateContentOnly(template, this.getFields().get("content"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.SysFormTemplateVO in project bamboobsc by billchen198318.
the class SystemFormTemplateSaveOrUpdateAction method delete.
private void delete() throws ControllerException, AuthorityException, ServiceException, Exception {
SysFormTemplateVO template = new SysFormTemplateVO();
this.transformFields2ValueObject(template, new String[] { "oid" });
DefaultResult<Boolean> result = this.systemFormLogicService.deleteTemplate(template);
this.message = result.getSystemMessage().getValue();
if (result.getValue() != null && result.getValue()) {
this.success = IS_YES;
}
}
use of com.netsteadfast.greenstep.vo.SysFormTemplateVO in project bamboobsc by billchen198318.
the class SystemFormLogicServiceImpl method create.
@ServiceMethodAuthority(type = { ServiceMethodType.INSERT })
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = { RuntimeException.class, IOException.class, Exception.class })
@Override
public DefaultResult<SysFormVO> create(SysFormVO form, String templateOid) throws ServiceException, Exception {
if (null == form || super.isBlank(form.getFormId()) || super.isNoSelectId(templateOid)) {
throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
}
super.setStringValueMaxLength(form, "description", MAX_DESCRIPTION_LENGTH);
SysFormTemplateVO template = this.findTemplate(templateOid);
form.setTemplateId(template.getTplId());
return this.sysFormService.saveObject(form);
}
use of com.netsteadfast.greenstep.vo.SysFormTemplateVO in project bamboobsc by billchen198318.
the class SystemFormLogicServiceImpl method findTemplate.
private SysFormTemplateVO findTemplate(String templateOid) throws ServiceException, Exception {
SysFormTemplateVO template = new SysFormTemplateVO();
template.setOid(templateOid);
DefaultResult<SysFormTemplateVO> result = this.sysFormTemplateService.findObjectByOid(template);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
return result.getValue();
}
Aggregations