Class FileRepository
java.lang.Object
com.levigo.jadice.web.server.file.FileRepository
- Direct Known Subclasses:
ExportRepository
Customer specific repository
Allows the registration of new FileMetas via register(FileMeta).
Uses GeneratedIdRepository to store references of an arbitrary number of FileMetas.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final GeneratedIdRepository<FileMeta> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(int maxAgeMinutes) voidCleans up the file (on disk) and the meta if the file was accessed more than the specified accessCountderegister(String id) Deregisters a FileMeta.getOlderThan(long timestamp) void
-
Field Details
-
KEY
-
repository
-
-
Constructor Details
-
FileRepository
public FileRepository() -
FileRepository
public FileRepository(int idLength)
-
-
Method Details
-
register
- Parameters:
meta-- Returns:
-
register
- Parameters:
id-meta-
-
deregister
Deregisters a FileMeta. If the FileMeta contains a File please make sure you manually delete that file.- Parameters:
id-- Returns:
-
getMeta
-
getOlderThan
-
cleanup
Cleans up the file (on disk) and the meta if the file was accessed more than the specified accessCount- Parameters:
meta-id-
-
cleanup
public void cleanup(int maxAgeMinutes)
-