spotlessApply 적용

This commit is contained in:
2025-12-03 18:48:13 +09:00
parent 7884416e75
commit 767a11559f
4 changed files with 20 additions and 27 deletions

View File

@@ -1,10 +1,9 @@
package com.kamco.cd.kamcoback.common.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class NameValidator {
public class NameValidator {
private static final String HANGUL_REGEX = ".*\\p{IsHangul}.*";
private static final Pattern HANGUL_PATTERN = Pattern.compile(HANGUL_REGEX);
@@ -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;
}
}

View File

@@ -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;

View File

@@ -43,14 +43,14 @@ public class FileDto {
private final Boolean isValid;
public FolderDto(
String folderNm,
String parentFolderNm,
String parentPath,
String fullPath,
int depth,
long childCnt,
String lastModified,
Boolean isValid) {
String folderNm,
String parentFolderNm,
String parentPath,
String fullPath,
int depth,
long childCnt,
String lastModified,
Boolean isValid) {
this.folderNm = folderNm;
this.parentFolderNm = parentFolderNm;
this.parentPath = parentPath;
@@ -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 {
@@ -92,7 +91,7 @@ public class FileDto {
private final String lastModified;
public Basic(
String fileNm, String filePath, String extension, long fileSize, String lastModified) {
String fileNm, String filePath, String extension, long fileSize, String lastModified) {
this.fileNm = fileNm;
this.filePath = filePath;
this.extension = extension;

View File

@@ -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,9 +112,11 @@ public class MapSheetMngService {
folderTotCnt = folderDtoList.size();
folderErrTotCnt = (int)folderDtoList.stream()
.filter(dto -> dto.getIsValid().toString().equals("false") )
.count();
folderErrTotCnt =
(int)
folderDtoList.stream()
.filter(dto -> dto.getIsValid().toString().equals("false"))
.count();
} catch (IOException e) {
throw new RuntimeException(e);