Quellcode durchsuchen

将校验长度改为20

zlSun vor 1 Jahr
Ursprung
Commit
79996f1cf9

+ 1 - 1
datagear-web/pom.xml

@@ -11,7 +11,7 @@
 
 	<artifactId>datagear-web</artifactId>
 	<name>datagear-web</name>
-	<packaging>war</packaging>
+	<packaging>jar</packaging>
 
 	<properties>
 		<failOnMissingWebXml>false</failOnMissingWebXml>

+ 2 - 2
datagear-web/src/main/java/org/datagear/web/controller/ChartController.java

@@ -297,7 +297,7 @@ public class ChartController extends AbstractChartPluginAwareController implemen
 			inflateHtmlChartWidgetEntity(entity, request);
 
 			checkSaveEntity(entity);
-			if(entity.getName().length()>40){
+			if(entity.getName().length()>20){
 				return buildOperationMessageFailResponseEntity(null, HttpStatus.BAD_REQUEST,"nameIsTooLong");
 			}
 			if(this.chartService.isExit(entity)){
@@ -310,7 +310,7 @@ public class ChartController extends AbstractChartPluginAwareController implemen
 		{
 			inflateHtmlChartWidgetEntity(entity, request);
 			checkSaveEntity(entity);
-			if(entity.getName().length()>40){
+			if(entity.getName().length()>20){
 				return buildOperationMessageFailResponseEntity(null, HttpStatus.BAD_REQUEST,"nameIsTooLong");
 			}
 			if(!htmlChartWidgetEntityService.getById(entity.getId()).getName().equals(entity.getName())){

+ 14 - 14
datagear-web/src/main/java/org/datagear/web/controller/DataSetController.java

@@ -190,7 +190,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -231,7 +231,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -274,7 +274,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -318,7 +318,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -361,7 +361,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -405,7 +405,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -448,7 +448,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(this.dataSetService.isExit(dataSet)){
@@ -571,7 +571,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -597,7 +597,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -625,7 +625,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -654,7 +654,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -681,7 +681,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -709,7 +709,7 @@ public class DataSetController extends AbstractSchemaConnController
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
 		trimDirectoryFileDataSetEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){
@@ -736,7 +736,7 @@ public class DataSetController extends AbstractSchemaConnController
 			return responseEntity;
 
 		trimAnalysisProjectAwareEntityForSave(dataSet);
-		if(dataSet.getName().length()>40){
+		if(dataSet.getName().length()>20){
 			return buildOperationMessageFailResponseEntity(null,HttpStatus.BAD_REQUEST,"nameIsTooLong");
 		}
 		if(!dataSetEntityService.getDataSet(dataSet.getId()).getName().equals(dataSet.getName())){

+ 1 - 1
datagear-web/src/main/resources/org/datagear/web/i18n/message.properties

@@ -1296,4 +1296,4 @@ dashboardShareSet.validation.confirmPasswordIncorrect=\u4E0E[\u8BBF\u95EE\u5BC6\
 
 #\u91CD\u547D\u540D\u8BBE\u7F6E
 nameIsExist=\u540D\u79F0\u5DF2\u5B58\u5728
-nameIsTooLong=\u540D\u79F0\u8FC7\u957F\uFF0C\u8BF7\u9650\u5236\u572840\u4E2A\u5B57\u7B26\u5185
+nameIsTooLong=\u540D\u79F0\u8FC7\u957F\uFF0C\u8BF7\u9650\u5236\u572820\u4E2A\u5B57\u7B26\u5185

+ 1 - 1
datagear-web/src/main/resources/org/datagear/web/i18n/message_en.properties

@@ -1296,4 +1296,4 @@ dashboardShareSet.validation.confirmPasswordIncorrect=Confirm password incorrect
 
 #\u91CD\u547D\u540D\u8BBE\u7F6E
 nameIsExist=\u540D\u79F0\u5DF2\u5B58\u5728
-nameIsTooLong=\u540D\u79F0\u8FC7\u957F\uFF0C\u8BF7\u9650\u5236\u572840\u4E2A\u5B57\u7B26\u5185
+nameIsTooLong=\u540D\u79F0\u8FC7\u957F\uFF0C\u8BF7\u9650\u5236\u572820\u4E2A\u5B57\u7B26\u5185