-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- FileDataHandlerService getFileList, hashNext - FileService getFiles - FolderDataHandlerService getFolderList hasNext - FolderService getFolders - StorageFacadeService getFolderContents - PagingUtil calculateSize createPageable
- Loading branch information
1 parent
15ad8be
commit a0fce68
Showing
21 changed files
with
337 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/com/c4cometrue/mystorage/file/dto/FileContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.c4cometrue.mystorage.file.dto; | ||
|
||
public record FileContent(Long fileId, String fileName) { | ||
public static FileContent of (Long fileId, String fileName) { | ||
return new FileContent(fileId, fileName); | ||
} | ||
} |
7 changes: 0 additions & 7 deletions
7
src/main/java/com/c4cometrue/mystorage/file/dto/FileContentsRes.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/com/c4cometrue/mystorage/folder/dto/FolderContent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.c4cometrue.mystorage.folder.dto; | ||
|
||
public record FolderContent(Long folderId, String fileName) { | ||
public static FolderContent of(Long folderId, String fileName) { | ||
return new FolderContent(folderId, fileName); | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
src/main/java/com/c4cometrue/mystorage/folder/dto/FolderContentsRes.java
This file was deleted.
Oops, something went wrong.
16 changes: 2 additions & 14 deletions
16
src/main/java/com/c4cometrue/mystorage/meta/MetadataType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
package com.c4cometrue.mystorage.meta; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum MetadataType { | ||
FILE("File"), | ||
FOLDER("Folder"); | ||
|
||
private String type; | ||
|
||
private MetadataType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
FILE, | ||
FOLDER; | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/java/com/c4cometrue/mystorage/meta/PagingHelper.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/c4cometrue/mystorage/util/PagingUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.c4cometrue.mystorage.util; | ||
|
||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
public class PagingUtil { | ||
private PagingUtil() { | ||
throw new AssertionError("should not be invoke"); | ||
} | ||
private static final int DEFAULT_SIZE = 10; | ||
|
||
public static Integer calculateSize(Integer size) { | ||
return size == null ? DEFAULT_SIZE : size; | ||
} | ||
|
||
public static Pageable createPageable(int size) { | ||
return PageRequest.of(0, size); | ||
} | ||
} |
Oops, something went wrong.