Skip to content

Commit 48d68a6

Browse files
committed
Rename ExcelUtils to ExcelSheet bacause it is not Util class
1 parent b4ba54e commit 48d68a6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/main/java/root/core/usecase/implement/DBCheckUsecaseImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import root.utils.CsvUtils;
2323
import root.utils.DBManageExcel;
2424
import root.utils.DateUtils;
25-
import root.utils.ExcelUtils;
25+
import root.utils.ExcelSheet;
2626

2727
public class DBCheckUsecaseImpl implements DBCheckUsecase {
2828
private DBCheckRepository dbCheckRepository;
@@ -113,7 +113,7 @@ public void writeExcelArchiveUsageCheck() throws Exception {
113113
DBManageExcel.createMonthlyReportInExcel(year, month);
114114
}
115115

116-
Workbook workbook = ExcelUtils.getWorkbook(new FileInputStream(file), fileName + extension);
116+
Workbook workbook = ExcelSheet.getWorkbook(new FileInputStream(file), fileName + extension);
117117
Sheet sheet = workbook.getSheetAt(0);
118118
sheet.getRow(rowIndex).getCell(colIndex).setCellValue(archiveUsage + "%");
119119
OutputStream os = new FileOutputStream(file);

src/main/java/root/core/usecase/implement/ServerCheckUsecaseImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import root.utils.CsvUtils;
3333
import root.utils.DBManageExcel;
3434
import root.utils.DateUtils;
35-
import root.utils.ExcelUtils;
35+
import root.utils.ExcelSheet;
3636

3737
public class ServerCheckUsecaseImpl implements ServerCheckUsecase {
3838
private ServerCheckRepository serverCheckRepository;
@@ -212,7 +212,7 @@ public void writeExcelOSDiskUsage() throws Exception {
212212
is = new FileInputStream(file);
213213
}
214214

215-
Workbook workbook = ExcelUtils.getWorkbook(is, fileName+extension);
215+
Workbook workbook = ExcelSheet.getWorkbook(is, fileName+extension);
216216
Sheet sheet = workbook.getSheetAt(0);
217217

218218
for (OSDiskUsage data : result.getMonitoringResults()) {

src/main/java/root/utils/DBManageExcel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import org.apache.poi.ss.usermodel.IndexedColors;
1010
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
1111

12-
public class DBManageExcel extends ExcelUtils {
12+
public class DBManageExcel extends ExcelSheet {
1313

1414
public DBManageExcel(String sheetName) {
1515
super(sheetName);
@@ -30,7 +30,7 @@ public static void createMonthlyReportInExcel(int year, int month) {
3030
String extension = ".xlsx";
3131
fos = new FileOutputStream(filePath + fileName + extension);
3232

33-
ExcelUtils excel = new ExcelUtils("MonthlyReport");
33+
ExcelSheet excel = new ExcelSheet("MonthlyReport");
3434

3535
// CellStyle 생성
3636
// 1. 회색 배경, 검은색 실선 테두리, 중앙정렬

src/main/java/root/utils/ExcelUtils.java renamed to src/main/java/root/utils/ExcelSheet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.apache.poi.xssf.usermodel.XSSFSimpleShape;
3939
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
4040

41-
public class ExcelUtils {
41+
public class ExcelSheet {
4242
private XSSFWorkbook workbook;
4343
private XSSFSheet sheet;
4444
private int rowIndex = 0;
@@ -48,7 +48,7 @@ public class ExcelUtils {
4848
// 1. DB 관리대장 포맷을 월별로 작성해주는 메서드 작성 (관리대장 신규 생성)
4949
// 2. 기존 관리대장을 읽어 특정 날짜의 DB 모니터링 결과를 추가하는 메서드 작성 (모니터링 결과 작성)
5050

51-
public ExcelUtils(String sheetName) {
51+
public ExcelSheet(String sheetName) {
5252
workbook = new XSSFWorkbook();
5353
sheet = workbook.createSheet(sheetName);
5454
}

0 commit comments

Comments
 (0)