spotlessApply 적용
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.kamco.cd.kamcoback.common.utils;
|
||||
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -12,7 +11,6 @@ public class NameValidator {
|
||||
private static final String WHITESPACE_REGEX = ".*\\s.*";
|
||||
private static final Pattern WHITESPACE_PATTERN = Pattern.compile(WHITESPACE_REGEX);
|
||||
|
||||
|
||||
public static boolean containsKorean(String str) {
|
||||
if (str == null || str.isEmpty()) {
|
||||
return false;
|
||||
@@ -21,7 +19,6 @@ public class NameValidator {
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
|
||||
public static boolean containsWhitespaceRegex(String str) {
|
||||
if (str == null || str.isEmpty()) {
|
||||
return false;
|
||||
@@ -43,6 +40,4 @@ public class NameValidator {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.kamco.cd.kamcoback.mapsheet;
|
||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
||||
import com.kamco.cd.kamcoback.code.service.CommonCodeService;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FoldersDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;
|
||||
|
||||
@@ -70,7 +70,8 @@ public class FileDto {
|
||||
private final int folderErrTotCnt;
|
||||
private final List<FolderDto> folders;
|
||||
|
||||
public FoldersDto(String dirPath, int folderTotCnt, int folderErrTotCnt, List<FolderDto> folders) {
|
||||
public FoldersDto(
|
||||
String dirPath, int folderTotCnt, int folderErrTotCnt, List<FolderDto> folders) {
|
||||
|
||||
this.dirPath = dirPath;
|
||||
this.folderTotCnt = folderTotCnt;
|
||||
@@ -79,8 +80,6 @@ public class FileDto {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Schema(name = "File Basic", description = "파일 기본 정보")
|
||||
@Getter
|
||||
public static class Basic {
|
||||
|
||||
@@ -37,7 +37,6 @@ public class MapSheetMngService {
|
||||
|
||||
private final MapSheetMngCoreService mapSheetMngCoreService;
|
||||
|
||||
|
||||
public FoldersDto getFolderAll(SrchFoldersDto srchDto) {
|
||||
|
||||
Path startPath = Paths.get(srchDto.getDirPath());
|
||||
@@ -68,8 +67,8 @@ public class MapSheetMngService {
|
||||
String fullPath = path.toAbsolutePath().toString();
|
||||
|
||||
boolean isValid = true;
|
||||
if( NameValidator.containsKorean(folderNm) ||
|
||||
NameValidator.containsWhitespaceRegex(folderNm) ){
|
||||
if (NameValidator.containsKorean(folderNm)
|
||||
|| NameValidator.containsWhitespaceRegex(folderNm)) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
@@ -99,8 +98,7 @@ public class MapSheetMngService {
|
||||
depth,
|
||||
childCnt,
|
||||
lastModified,
|
||||
isValid
|
||||
);
|
||||
isValid);
|
||||
|
||||
return folderDto;
|
||||
})
|
||||
@@ -114,7 +112,9 @@ public class MapSheetMngService {
|
||||
|
||||
folderTotCnt = folderDtoList.size();
|
||||
|
||||
folderErrTotCnt = (int)folderDtoList.stream()
|
||||
folderErrTotCnt =
|
||||
(int)
|
||||
folderDtoList.stream()
|
||||
.filter(dto -> dto.getIsValid().toString().equals("false"))
|
||||
.count();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user