Skip to content

Commit 95a83a0

Browse files
committed
refactor: deprecate EasyExcel, FastExcel, and FastExcelFactory classes with migration guidance to FesodSheet
1 parent ba9d29e commit 95a83a0

File tree

4 files changed

+211
-16
lines changed

4 files changed

+211
-16
lines changed

fesod/src/main/java/org/apache/fesod/sheet/EasyExcel.java

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,50 @@
2020
package org.apache.fesod.sheet;
2121

2222
/**
23-
* An alias class for {@link FesodSheet}.
24-
* This class is deprecated; use {@link FesodSheet} instead.
25-
* <p>
26-
* This class will be removed in future versions.
27-
* </p>
23+
* Legacy alias for {@link FesodSheet}.
24+
*
25+
* <p><strong>DEPRECATED:</strong> This class has been deprecated as part of the project's transition
26+
* to the Apache Fesod branding. Users should migrate to {@link FesodSheet} for all new development.
27+
*
28+
* <h3>Migration Guide</h3>
29+
* <p>Replace all occurrences of {@code EasyExcel} with {@code FesodSheet} in your codebase:
30+
*
31+
* <table border="1">
32+
* <caption>Migration Examples</caption>
33+
* <tr>
34+
* <th>Old Code (Deprecated)</th>
35+
* <th>New Code (Recommended)</th>
36+
* </tr>
37+
* <tr>
38+
* <td>{@code EasyExcel.read(file, DemoData.class, listener)}</td>
39+
* <td>{@code FesodSheet.read(file, DemoData.class, listener)}</td>
40+
* </tr>
41+
* <tr>
42+
* <td>{@code EasyExcel.write(file, DemoData.class)}</td>
43+
* <td>{@code FesodSheet.write(file, DemoData.class)}</td>
44+
* </tr>
45+
* <tr>
46+
* <td>{@code EasyExcel.readSheet(0)}</td>
47+
* <td>{@code FesodSheet.readSheet(0)}</td>
48+
* </tr>
49+
* <tr>
50+
* <td>{@code EasyExcel.writerSheet("Sheet1")}</td>
51+
* <td>{@code FesodSheet.writerSheet("Sheet1")}</td>
52+
* </tr>
53+
* </table>
54+
*
55+
* <h3>Why Deprecated?</h3>
56+
* <p>This class was originally named "EasyExcel" but has been superseded by "FesodSheet"
57+
* to align with Apache Fesod's official branding and naming conventions. The functionality
58+
* remains identical; only the class name has changed.
59+
*
60+
* <h3>Removal Timeline</h3>
61+
* <p>This class is marked for removal in a future major version. All functionality is
62+
* available in {@link FesodSheet}.
63+
*
64+
* @deprecated Since version 1.0.0. Use {@link FesodSheet} instead.
65+
* This class will be removed in a future major release.
66+
* @see FesodSheet
2867
*/
2968
@Deprecated
3069
public class EasyExcel extends FesodSheet {}

fesod/src/main/java/org/apache/fesod/sheet/FastExcel.java

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,62 @@
2020
package org.apache.fesod.sheet;
2121

2222
/**
23-
* An alias class for {@link FesodSheet}.
24-
* This class is deprecated; use {@link FesodSheet} instead.
25-
* <p>
26-
* This class will be removed in future versions.
27-
* </p>
23+
* Legacy short alias for {@link FesodSheet}.
24+
*
25+
* <p><strong>DEPRECATED:</strong> This class has been deprecated as part of the project's evolution
26+
* from "FastExcel" to "Apache Fesod". Users should migrate to {@link FesodSheet} for all new development.
27+
*
28+
* <h3>Migration Guide</h3>
29+
* <p>Replace all occurrences of {@code FastExcel} with {@code FesodSheet} in your codebase:
30+
*
31+
* <table border="1">
32+
* <caption>Migration Examples</caption>
33+
* <tr>
34+
* <th>Old Code (Deprecated)</th>
35+
* <th>New Code (Recommended)</th>
36+
* </tr>
37+
* <tr>
38+
* <td>{@code FastExcel.read("data.xlsx", DemoData.class, listener)}</td>
39+
* <td>{@code FesodSheet.read("data.xlsx", DemoData.class, listener)}</td>
40+
* </tr>
41+
* <tr>
42+
* <td>{@code FastExcel.write("output.xlsx", DemoData.class)}</td>
43+
* <td>{@code FesodSheet.write("output.xlsx", DemoData.class)}</td>
44+
* </tr>
45+
* <tr>
46+
* <td>{@code FastExcel.readSheet(0)}</td>
47+
* <td>{@code FesodSheet.readSheet(0)}</td>
48+
* </tr>
49+
* <tr>
50+
* <td>{@code FastExcel.writerSheet("MySheet")}</td>
51+
* <td>{@code FesodSheet.writerSheet("MySheet")}</td>
52+
* </tr>
53+
* </table>
54+
*
55+
* <h3>Why Deprecated?</h3>
56+
* <p>This class was originally named "FastExcel" to provide a short, memorable entry point
57+
* for the library. However, following the project's acceptance into the Apache Software Foundation
58+
* as Apache Fesod (incubating), it has been superseded by "FesodSheet" to align with the official
59+
* project branding. The functionality remains identical; only the class name has changed.
60+
*
61+
* <h3>Historical Context</h3>
62+
* <p>The name "FastExcel" emphasized the library's high-performance characteristics and ease of use.
63+
* The Apache Fesod name (Fast Easy Spreadsheet and Other Documents) retains this heritage while
64+
* fitting Apache naming conventions.
65+
*
66+
* <h3>Relationship with FastExcelFactory</h3>
67+
* <p>Both {@code FastExcel} and {@link FastExcelFactory} are deprecated aliases pointing to
68+
* the same underlying implementation. {@code FastExcel} was the short, convenient alias while
69+
* {@code FastExcelFactory} used the explicit "Factory" suffix.
70+
*
71+
* <h3>Removal Timeline</h3>
72+
* <p>This class is marked for removal in a future major version. All functionality is
73+
* available in {@link FesodSheet}.
74+
*
75+
* @deprecated Since version 1.0.0. Use {@link FesodSheet} instead.
76+
* This class will be removed in a future major release.
77+
* @see FesodSheet
78+
* @see FastExcelFactory
2879
*/
2980
@Deprecated
3081
public class FastExcel extends FesodSheet {}

fesod/src/main/java/org/apache/fesod/sheet/FastExcelFactory.java

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,56 @@
2020
package org.apache.fesod.sheet;
2121

2222
/**
23-
* An alias class for {@link FesodSheet}.
24-
* This class is deprecated; use {@link FesodSheet} instead.
25-
* <p>
26-
* This class will be removed in future versions.
27-
* </p>
23+
* Legacy factory class alias for {@link FesodSheet}.
24+
*
25+
* <p><strong>DEPRECATED:</strong> This class has been deprecated as part of the project's evolution
26+
* from "FastExcel" to "Apache Fesod". Users should migrate to {@link FesodSheet} for all new development.
27+
*
28+
* <h3>Migration Guide</h3>
29+
* <p>Replace all occurrences of {@code FastExcelFactory} with {@code FesodSheet} in your codebase:
30+
31+
* <table border="1">
32+
* <caption>Migration Examples</caption>
33+
* <tr>
34+
* <th>Old Code (Deprecated)</th>
35+
* <th>New Code (Recommended)</th>¡
36+
* </tr>
37+
* <tr>
38+
* <td>{@code FastExcelFactory.read(inputStream, DemoData.class, listener)}</td>
39+
* <td>{@code FesodSheet.read(inputStream, DemoData.class, listener)}</td>
40+
* </tr>
41+
* <tr>
42+
* <td>{@code FastExcelFactory.write(outputStream, DemoData.class)}</td>
43+
* <td>{@code FesodSheet.write(outputStream, DemoData.class)}</td>
44+
* </tr>
45+
* <tr>
46+
* <td>{@code FastExcelFactory.readSheet(0, "Sheet1")}</td>
47+
* <td>{@code FesodSheet.readSheet(0, "Sheet1")}</td>
48+
* </tr>
49+
* <tr>
50+
* <td>{@code FastExcelFactory.writerTable(0)}</td>
51+
* <td>{@code FesodSheet.writerTable(0)}</td>
52+
* </tr>
53+
* </table>
54+
*
55+
* <h3>Why Deprecated?</h3>
56+
* <p>This class was part of the original "FastExcel" branding but has been superseded by
57+
* "FesodSheet" following the project's acceptance into the Apache Software Foundation as
58+
* Apache Fesod (incubating). The functionality remains identical; only the class name has changed.
59+
*
60+
* <h3>Relationship with FastExcel</h3>
61+
* <p>Both {@link FastExcel} and {@code FastExcelFactory} are deprecated aliases pointing to
62+
* the same underlying implementation. {@code FastExcel} was the short alias while
63+
* {@code FastExcelFactory} used the explicit "Factory" suffix.
64+
*
65+
* <h3>Removal Timeline</h3>
66+
* <p>This class is marked for removal in a future major version. All functionality is
67+
* available in {@link FesodSheet}.
68+
*
69+
* @deprecated Since version 1.0.0. Use {@link FesodSheet} instead.
70+
* This class will be removed in a future major release.
71+
* @see FesodSheet
72+
* @see FastExcel
2873
*/
2974
@Deprecated
3075
public class FastExcelFactory extends FesodSheet {}

fesod/src/main/java/org/apache/fesod/sheet/FesodSheet.java

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,67 @@
3030
import org.apache.fesod.sheet.write.builder.ExcelWriterTableBuilder;
3131

3232
/**
33-
* Core classes of the Fesod spreadsheet processor
33+
* Core factory class providing static methods for creating Excel readers and writers.
34+
*
35+
* <p>This class serves as the primary entry point for the Fesod library, offering a fluent API
36+
* for both reading and writing Excel files. It provides a unified interface to simplify Excel
37+
* operations through the builder pattern.
38+
*
39+
* <h3>Key Features</h3>
40+
* <ul>
41+
* <li>Supports multiple input/output sources: File, String path, InputStream, OutputStream</li>
42+
* <li>Provides builder pattern for flexible configuration</li>
43+
* <li>Supports annotation-driven mapping via {@code @ExcelProperty}</li>
44+
* <li>Handles both .xls (Excel 97-2003) and .xlsx (Excel 2007+) formats</li>
45+
* <li>Enables stream-based processing for memory efficiency</li>
46+
* </ul>
47+
*
48+
* <h3>Reading Examples</h3>
49+
* <pre>{@code
50+
* // Simple read with listener
51+
* FesodSheet.read("demo.xlsx", DemoData.class, new DemoDataListener())
52+
* .sheet()
53+
* .doRead();
54+
*
55+
* // Advanced read with custom configuration
56+
* try (ExcelReader excelReader = FesodSheet.read(file)
57+
* .headRowNumber(1)
58+
* .ignoreEmptyRow(true)
59+
* .build()) {
60+
* ReadSheet readSheet = FesodSheet.readSheet(0).build();
61+
* excelReader.read(readSheet);
62+
* }
63+
* }</pre>
64+
*
65+
* <h3>Writing Examples</h3>
66+
* <pre>{@code
67+
* // Simple write
68+
* FesodSheet.write("output.xlsx", DemoData.class)
69+
* .sheet("Sheet1")
70+
* .doWrite(dataList);
71+
*
72+
* // Advanced write with custom configuration
73+
* try (ExcelWriter excelWriter = FesodSheet.write(outputStream)
74+
* .build()) {
75+
* WriteSheet writeSheet = FesodSheet.writerSheet(0, "Template").build();
76+
* excelWriter.write(dataList, writeSheet);
77+
* }
78+
* }</pre>
79+
*
80+
* <h3>Deprecated Aliases</h3>
81+
* <p>The following classes are deprecated aliases that extend FesodSheet:
82+
* <ul>
83+
* <li>{@link EasyExcel} - Legacy alias from the EasyExcel branding</li>
84+
* <li>{@link FastExcel} - Legacy short alias from the FastExcel branding</li>
85+
* <li>{@link FastExcelFactory} - Legacy factory alias from the FastExcel branding</li>
86+
* </ul>
87+
* All new code should use {@code FesodSheet} directly.
88+
*
89+
* @see ExcelReader
90+
* @see ExcelWriter
91+
* @see org.apache.fesod.sheet.read.builder.ExcelReaderBuilder
92+
* @see org.apache.fesod.sheet.write.builder.ExcelWriterBuilder
93+
* @since 1.0.0
3494
*/
3595
public class FesodSheet {
3696

0 commit comments

Comments
 (0)