Class FsFileStorePlugin
- java.lang.Object
-
- io.vertigo.datastore.plugins.filestore.fs.FsFileStorePlugin
-
- All Implemented Interfaces:
io.vertigo.core.node.component.Activeable,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin,FileStorePlugin
public final class FsFileStorePlugin extends Object implements FileStorePlugin, io.vertigo.core.node.component.Activeable
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 FsFileStorePlugin(Optional<String> name, String storeDtDefinitionName, String path, String fileInfoClassName, VTransactionManager transactionManager)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.StringgetDocumentRoot()récupère la valeur de documentRoot.Class<? extends FileInfo>getFileInfoClass()Get's the FileInfo Class that are handled by the particular pluginStringgetName()FileInforead(FileInfoURI uri)Load a file by its URI.voidstart()voidstop()voidupdate(FileInfo fileInfo)Save a file.
-
-
-
Constructor Detail
-
FsFileStorePlugin
@Inject public FsFileStorePlugin(Optional<String> name, String storeDtDefinitionName, String path, String fileInfoClassName, VTransactionManager transactionManager)
Constructor.- Parameters:
name- Store namestoreDtDefinitionName- Nom du dt de stockagepath- le chemin jndi pour récupérer le paramètre path dans le contexttransactionManager- Manager des transactions
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stopin interfaceio.vertigo.core.node.component.Activeable
-
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:
-
getDocumentRoot
public String getDocumentRoot()
récupère la valeur de documentRoot.- Returns:
- valeur de documentRoot
-
-