コード例 #1
0
 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;
 }
コード例 #2
0
 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;
   }
 }