Java Code Examples for com.xxl.job.admin.core.model.XxlJobGroup#getAppname()
The following examples show how to use
com.xxl.job.admin.core.model.XxlJobGroup#getAppname() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobGroupController.java From xxl-job with GNU General Public License v3.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(XxlJobGroup xxlJobGroup){ // valid if (xxlJobGroup.getAppname()==null || xxlJobGroup.getAppname().trim().length()==0) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input")+"AppName") ); } if (xxlJobGroup.getAppname().length()<4 || xxlJobGroup.getAppname().length()>64) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_appname_length") ); } if (xxlJobGroup.getTitle()==null || xxlJobGroup.getTitle().trim().length()==0) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) ); } if (xxlJobGroup.getAddressType()!=0) { if (xxlJobGroup.getAddressList()==null || xxlJobGroup.getAddressList().trim().length()==0) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") ); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item: addresss) { if (item==null || item.trim().length()==0) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") ); } } } int ret = xxlJobGroupDao.save(xxlJobGroup); return (ret>0)?ReturnT.SUCCESS:ReturnT.FAIL; }