Pārlūkot izejas kodu

update some codestyle

陈精华 1 gadu atpakaļ
vecāks
revīzija
fbf70047eb

+ 12 - 12
server/src/main/java/cn/keking/model/FileType.java

@@ -26,23 +26,23 @@ public enum FileType {
     TIFF("tiffFilePreviewImpl"),
     OFD("ofdFilePreviewImpl"),
     EML("emlFilePreviewImpl"),
-    Online3D("online3DFilePreviewImpl"),
+    ONLINE3D("online3DFilePreviewImpl"),
     XMIND("xmindFilePreviewImpl"),
     SVG("svgFilePreviewImpl"),
-    Epub("epubFilePreviewImpl"),
+    EPUB("epubFilePreviewImpl"),
     BPMN("bpmnFilePreviewImpl"),
     DCM("dcmFilePreviewImpl"),
-    DRAWUI("drawioFilePreviewImpl");
+    DRAWIO("drawioFilePreviewImpl");
 
     private static final String[] OFFICE_TYPES = {"docx", "wps", "doc", "docm", "xls", "xlsx", "csv" ,"xlsm", "ppt", "pptx", "vsd", "rtf", "odt", "wmf", "emf", "dps", "et", "ods", "ots", "tsv", "odp", "otp", "sxi", "ott", "vsdx", "fodt", "fods", "xltx","tga","psd","dotm","ett","xlt","xltm","wpt","dot","xlam","dotx","xla","pages", "eps"};
     private static final String[] PICTURE_TYPES = {"jpg", "jpeg", "png", "gif", "bmp", "ico", "jfif", "webp"};
     private static final String[] ARCHIVE_TYPES = {"rar", "zip", "jar", "7-zip", "tar", "gzip", "7z"};
-    private static final String[] Online3D_TYPES = {"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"};
+    private static final String[] ONLINE3D_TYPES = {"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"};
     private static final String[] EML_TYPES = {"eml"};
     private static final String[] XMIND_TYPES = {"xmind"};
-    private static final String[] Epub_TYPES = {"epub"};
+    private static final String[] EPUB_TYPES = {"epub"};
     private static final String[] DCM_TYPES = {"dcm"};
-    private static final String[] DRAWUI_TYPES = {"drawio"};
+    private static final String[] DRAWIO_TYPES = {"drawio"};
     private static final String[] TIFF_TYPES = {"tif", "tiff"};
     private static final String[] OFD_TYPES = {"ofd"};
     private static final String[] SVG_TYPES = {"svg"};
@@ -87,8 +87,8 @@ public enum FileType {
         for (String svg : SVG_TYPES) {
             FILE_TYPE_MAPPER.put(svg, FileType.SVG);
         }
-        for (String epub : Epub_TYPES) {
-            FILE_TYPE_MAPPER.put(epub, FileType.Epub);
+        for (String epub : EPUB_TYPES) {
+            FILE_TYPE_MAPPER.put(epub, FileType.EPUB);
         }
         for (String eml : EML_TYPES) {
             FILE_TYPE_MAPPER.put(eml, FileType.EML);
@@ -96,14 +96,14 @@ public enum FileType {
         for (String xmind : XMIND_TYPES) {
             FILE_TYPE_MAPPER.put(xmind, FileType.XMIND);
         }
-        for (String online3D : Online3D_TYPES) {
-            FILE_TYPE_MAPPER.put(online3D, FileType.Online3D);
+        for (String online3D : ONLINE3D_TYPES) {
+            FILE_TYPE_MAPPER.put(online3D, FileType.ONLINE3D);
         }
         for (String dcm : DCM_TYPES) {
             FILE_TYPE_MAPPER.put(dcm, FileType.DCM);
         }
-        for (String drawio : DRAWUI_TYPES) {
-            FILE_TYPE_MAPPER.put(drawio, FileType.DRAWUI);
+        for (String drawio : DRAWIO_TYPES) {
+            FILE_TYPE_MAPPER.put(drawio, FileType.DRAWIO);
         }
         FILE_TYPE_MAPPER.put("md", FileType.MARKDOWN);
         FILE_TYPE_MAPPER.put("xml", FileType.XML);

+ 2 - 2
server/src/main/java/cn/keking/service/FilePreview.java

@@ -18,8 +18,8 @@ public interface FilePreview {
     String TIFF_FILE_PREVIEW_PAGE = "tiff";
     String OFD_FILE_PREVIEW_PAGE = "ofd";
     String SVG_FILE_PREVIEW_PAGE = "svg";
-    String Online3D_FILE_PAGE = "online3D";
-    String EpubFilePreviewImpl = "epub";
+    String ONLINE3D_PREVIEW_PAGE = "online3D";
+    String EPUB_PREVIEW_PAGE = "epub";
     String XMIND_FILE_PREVIEW_PAGE = "xmind";
     String EML_FILE_PREVIEW_PAGE = "eml";
     String OFFICE_PICTURE_FILE_PREVIEW_PAGE = "officePicture";

+ 1 - 1
server/src/main/java/cn/keking/service/impl/EpubFilePreviewImpl.java

@@ -22,6 +22,6 @@ public class EpubFilePreviewImpl implements FilePreview {
     @Override
     public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
         commonPreview.filePreviewHandle(url,model,fileAttribute);
-        return EpubFilePreviewImpl;
+        return EPUB_PREVIEW_PAGE;
     }
 }

+ 1 - 1
server/src/main/java/cn/keking/service/impl/Online3DFilePreviewImpl.java

@@ -21,6 +21,6 @@ public class Online3DFilePreviewImpl implements FilePreview {
     @Override
     public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
         commonPreview.filePreviewHandle(url,model,fileAttribute);
-        return Online3D_FILE_PAGE;
+        return ONLINE3D_PREVIEW_PAGE;
     }
 }