Class FsFullFileStorePlugin
- java.lang.Object
-
- io.vertigo.datastore.plugins.filestore.fs.FsFullFileStorePlugin
-
- All Implemented Interfaces:
io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin,FileStorePlugin
public final class FsFullFileStorePlugin extends Object implements FileStorePlugin
Permet de gérer les accès atomiques à n'importe quel type de stockage SQL/ non SQL pour les traitements de FileInfo.- Author:
- pchretien, npiedeloup, skerdudou
-
-
Constructor Summary
Constructors Constructor Description FsFullFileStorePlugin(Optional<String> name, String path, String fileInfoClassName, VTransactionManager transactionManager, Optional<Integer> purgeDelayMinutesOpt)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileInfocreate(FileInfo fileInfo)Save a file.voiddelete(FileInfoURI uri)Delete a file.voiddeleteOldFiles()Daemon to purge old filesClass<? extends FileInfo>getFileInfoClass()Get's the FileInfo Class that are handled by the particular pluginStringgetName()FileInforead(FileInfoURI uri)Load a file by its URI.voidupdate(FileInfo fileInfo)Save a file.
-
-
-
Constructor Detail
-
FsFullFileStorePlugin
@Inject public FsFullFileStorePlugin(Optional<String> name, String path, String fileInfoClassName, VTransactionManager transactionManager, Optional<Integer> purgeDelayMinutesOpt)
Constructor.- Parameters:
name- Store namepath- Root directorytransactionManager- Transaction managerpurgeDelayMinutesOpt- purge files older than this delay
-
-
Method Detail
-
deleteOldFiles
public void deleteOldFiles()
Daemon to purge old files
-
getName
public String getName()
- Specified by:
getNamein interfaceFileStorePlugin- Returns:
- Store name
-
read
public FileInfo read(FileInfoURI uri)
Load a file by its URI.- Specified by:
readin interfaceFileStorePlugin- Parameters:
uri- FileURI requested- Returns:
- FileInfo for this uri (null if not found).
-
create
public FileInfo create(FileInfo fileInfo)
Save a file. Input FileInfo must have an empty URI : insert mode- Specified by:
createin interfaceFileStorePlugin- Parameters:
fileInfo- File to save (creation)- Returns:
- the created FileInfo
-
update
public void update(FileInfo fileInfo)
Save a file. Input FileInfo must have an URI : update mode- Specified by:
updatein interfaceFileStorePlugin- Parameters:
fileInfo- File to save (modification)
-
delete
public void delete(FileInfoURI uri)
Delete a file.- Specified by:
deletein interfaceFileStorePlugin- Parameters:
uri- File's URI to remove
-
getFileInfoClass
public Class<? extends FileInfo> getFileInfoClass()
Description copied from interface:FileStorePluginGet's the FileInfo Class that are handled by the particular plugin- Specified by:
getFileInfoClassin interfaceFileStorePlugin- Returns:
-
-