导出配置域关键字处理
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
package com.nis.web.controller.configuration.ntc;
|
||||
|
||||
import java.io.File;
|
||||
@@ -15,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
@@ -26,7 +28,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
@@ -528,7 +529,8 @@ public class FileTransferCfgController extends BaseController{
|
||||
ipList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
|
||||
ftpkeyList=replaceList(ftpkeyList);
|
||||
ftpurlList=replaceList(ftpurlList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_IP", ipList);
|
||||
dataMap.put("NTC_FTP_URL", ftpurlList);
|
||||
@@ -542,5 +544,13 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
public static List<BaseStringCfg> replaceList(List<BaseStringCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BaseStringCfg base=(BaseStringCfg)list.get(i);
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -605,11 +606,11 @@ public class WebsiteController extends BaseController{
|
||||
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
|
||||
List<HttpUrlCfg> httpUrlList = new ArrayList<>();
|
||||
List<HttpReqHeadCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<HttpResHeadCfg> httpResHdrList = new ArrayList<>();
|
||||
List<HttpBodyCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<HttpBodyCfg> httpResBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpUrlList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
@@ -622,7 +623,11 @@ public class WebsiteController extends BaseController{
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
|
||||
httpUrlList=replaceBaseList(httpUrlList);
|
||||
httpReqHdrList=replaceComplexList(httpReqHdrList);
|
||||
httpResHdrList=replaceComplexList(httpResHdrList);
|
||||
httpReqBodyList=replaceBaseList(httpReqBodyList);
|
||||
httpResBodyList=replaceBaseList(httpResBodyList);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
@@ -719,4 +724,19 @@ public class WebsiteController extends BaseController{
|
||||
//return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
public static List<BaseStringCfg> replaceBaseList(List<BaseStringCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
BaseStringCfg base=(BaseStringCfg)list.get(i);
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public static List<ComplexkeywordCfg> replaceComplexList(List<ComplexkeywordCfg> list){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ComplexkeywordCfg base=(ComplexkeywordCfg)list.get(i);
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -354,6 +355,12 @@ public class WhiteListController extends CommonController{
|
||||
CfgIndexInfo cfgIndexInfo=domainService.exportDomainInfo(cfg);
|
||||
httpurlList.addAll(cfgIndexInfo.getHttpUrlList());
|
||||
}
|
||||
if(httpurlList.size()>0){
|
||||
for (int i = 0; i < httpurlList.size(); i++) {
|
||||
BaseStringCfg base=(BaseStringCfg)httpurlList.get(i);
|
||||
base.setCfgKeywords(Functions.replace(base.getCfgKeywords(), "***and***"," "));
|
||||
}
|
||||
}
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpurlList);
|
||||
/*}*/
|
||||
|
||||
Reference in New Issue
Block a user