Class DateDirectoryStrategy
java.lang.Object
overit.geocallapp.docshare.documents.bl.sharedresource.file.savingstrategy.SavingStrategy
overit.geocallapp.docshare.documents.bl.sharedresource.file.savingstrategy.DateDirectoryStrategy
- All Implemented Interfaces:
Serializable
A saving strategy that organizes files in a date-based directory structure.
This strategy:
This strategy:
- Creates directories under
DirectoryRoot.DOCSHARE_DIRECTORYwith current date subdirectories (format: YYYYMMDD) - Generates filenames based on the current time (format: HHmmssSSS)
Example of resulting path structure:
docshare/ # Base directory (DirectoryRoot.DOCSHARE_DIRECTORY)
+-- 20231205/ # Subdirectory (current date)
+-- 093045123.pdf # File (time-based name)
+-- 093046789.jpg # Another file
- Since:
- 14.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDirectory(BOFile file) Returns the name of directory where the file will be physically stored.getName(BOFile file, WebResource directory) Returns the name that will be used to save the file.
-
Constructor Details
-
DateDirectoryStrategy
public DateDirectoryStrategy()
-
-
Method Details