Java Code Examples for com.xxl.job.admin.core.model.XxlJobGroup#getAddressType()
The following examples show how to use
com.xxl.job.admin.core.model.XxlJobGroup#getAddressType() .
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 open-capacity-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(XxlJobGroup xxlJobGroup){ // valid if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) ); } if (xxlJobGroup.getAddressType()!=0) { if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") ); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item: addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") ); } } } int ret = xxlJobGroupDao.save(xxlJobGroup); return (ret>0)?ReturnT.SUCCESS:ReturnT.FAIL; }
Example 2
Source File: JobGroupController.java From open-capacity-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/update") @ResponseBody public ReturnT<String> update(XxlJobGroup xxlJobGroup){ // valid if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) ); } if (xxlJobGroup.getAddressType()!=0) { if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") ); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item: addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") ); } } } int ret = xxlJobGroupDao.update(xxlJobGroup); return (ret>0)?ReturnT.SUCCESS:ReturnT.FAIL; }
Example 3
Source File: JobGroupController.java From microservices-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(XxlJobGroup xxlJobGroup){ // valid if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) ); } if (xxlJobGroup.getAddressType()!=0) { if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") ); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item: addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") ); } } } int ret = xxlJobGroupDao.save(xxlJobGroup); return (ret>0)?ReturnT.SUCCESS:ReturnT.FAIL; }
Example 4
Source File: JobGroupController.java From microservices-platform with Apache License 2.0 | 5 votes |
@RequestMapping("/update") @ResponseBody public ReturnT<String> update(XxlJobGroup xxlJobGroup){ // valid if (xxlJobGroup.getAppName()==null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title")) ); } if (xxlJobGroup.getAddressType() == 0) { // 0=自动注册 List<String> registryList = findRegistryByAppName(xxlJobGroup.getAppName()); String addressListStr = null; if (registryList!=null && !registryList.isEmpty()) { Collections.sort(registryList); addressListStr = StringUtils.join(registryList, ","); } xxlJobGroup.setAddressList(addressListStr); } else { // 1=手动录入 if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit") ); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item: addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid") ); } } } int ret = xxlJobGroupDao.update(xxlJobGroup); return (ret>0)?ReturnT.SUCCESS:ReturnT.FAIL; }
Example 5
Source File: JobGroupController.java From zuihou-admin-boot with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(XxlJobGroup xxlJobGroup) { // valid if (xxlJobGroup.getAppName() == null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title"))); } if (xxlJobGroup.getAddressType() != 0) { if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit")); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item : addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid")); } } } int ret = xxlJobGroupDao.save(xxlJobGroup); return (ret > 0) ? ReturnT.SUCCESS : ReturnT.FAIL; }
Example 6
Source File: JobGroupController.java From zuihou-admin-boot with Apache License 2.0 | 5 votes |
@RequestMapping("/update") @ResponseBody public ReturnT<String> update(XxlJobGroup xxlJobGroup) { // valid if (xxlJobGroup.getAppName() == null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title"))); } if (xxlJobGroup.getAddressType() == 0) { // 0=自动注册 List<String> registryList = findRegistryByAppName(xxlJobGroup.getAppName()); String addressListStr = null; if (CollectionUtils.isNotEmpty(registryList)) { Collections.sort(registryList); addressListStr = StringUtils.join(registryList, ","); } xxlJobGroup.setAddressList(addressListStr); } else { // 1=手动录入 if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit")); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item : addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid")); } } } int ret = xxlJobGroupDao.update(xxlJobGroup); return (ret > 0) ? ReturnT.SUCCESS : ReturnT.FAIL; }
Example 7
Source File: JobGroupController.java From zuihou-admin-cloud with Apache License 2.0 | 5 votes |
@RequestMapping("/save") @ResponseBody public ReturnT<String> save(XxlJobGroup xxlJobGroup) { // valid if (xxlJobGroup.getAppName() == null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title"))); } if (xxlJobGroup.getAddressType() != 0) { if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit")); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item : addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid")); } } } int ret = xxlJobGroupDao.save(xxlJobGroup); return (ret > 0) ? ReturnT.SUCCESS : ReturnT.FAIL; }
Example 8
Source File: JobGroupController.java From zuihou-admin-cloud with Apache License 2.0 | 5 votes |
@RequestMapping("/update") @ResponseBody public ReturnT<String> update(XxlJobGroup xxlJobGroup) { // valid if (xxlJobGroup.getAppName() == null || StringUtils.isBlank(xxlJobGroup.getAppName())) { 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 || StringUtils.isBlank(xxlJobGroup.getTitle())) { return new ReturnT<String>(500, (I18nUtil.getString("system_please_input") + I18nUtil.getString("jobgroup_field_title"))); } if (xxlJobGroup.getAddressType() == 0) { // 0=自动注册 List<String> registryList = findRegistryByAppName(xxlJobGroup.getAppName()); String addressListStr = null; if (CollectionUtils.isNotEmpty(registryList)) { Collections.sort(registryList); addressListStr = StringUtils.join(registryList, ","); } xxlJobGroup.setAddressList(addressListStr); } else { // 1=手动录入 if (StringUtils.isBlank(xxlJobGroup.getAddressList())) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_addressType_limit")); } String[] addresss = xxlJobGroup.getAddressList().split(","); for (String item : addresss) { if (StringUtils.isBlank(item)) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_field_registryList_unvalid")); } } } int ret = xxlJobGroupDao.update(xxlJobGroup); return (ret > 0) ? ReturnT.SUCCESS : ReturnT.FAIL; }
Example 9
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; }