Class 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 Detail

      • FsFileStorePlugin

        @Inject
        public FsFileStorePlugin​(Optional<String> name,
                                 String storeDtDefinitionName,
                                 String path,
                                 String fileInfoClassName,
                                 VTransactionManager transactionManager)
        Constructor.
        Parameters:
        name - Store name
        storeDtDefinitionName - Nom du dt de stockage
        path - le chemin jndi pour récupérer le paramètre path dans le context
        transactionManager - Manager des transactions
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface io.vertigo.core.node.component.Activeable
      • stop

        public void stop()
        Specified by:
        stop in interface io.vertigo.core.node.component.Activeable
      • read

        public FileInfo read​(FileInfoURI uri)
        Load a file by its URI.
        Specified by:
        read in interface FileStorePlugin
        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:
        create in interface FileStorePlugin
        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:
        update in interface FileStorePlugin
        Parameters:
        fileInfo - File to save (modification)
      • getDocumentRoot

        public String getDocumentRoot()
        récupère la valeur de documentRoot.
        Returns:
        valeur de documentRoot