Interface IFileDataPersistenceAdapter<PersistenceContext,​Entity>

    • Method Detail

      • openForRead

        InputStream openForRead​(Supplier<PersistenceContext> persistenceContextFactory,
                                Entity entity)
                         throws IOException
        Opens an input stream to the content of a file entity.
        Parameters:
        persistenceContextFactory - Persistence context factory to use for accessing the persistence layer.
        entity - The entity to open.
        Returns:
        An input stream to the file content.
        Throws:
        IOException - If an error occurs while opening the file.
      • openForWrite

        OutputStream openForWrite​(Supplier<PersistenceContext> persistenceContextFactory,
                                  Entity entity)
                           throws IOException
        Opens an output stream for changing the content of a file entity. This should also update the file metadata, such as the user who last modified the file and the last modified time.
        Parameters:
        persistenceContextFactory - Persistence context factory to use for accessing the persistence layer.
        entity - The entity to open.
        Returns:
        An output stream to the file content.
        Throws:
        IOException - If an error occurs while opening the file.