Class StreamStoreFile

java.lang.Object
org.eclnt.jsfserver.streamstore.StreamStoreFile
All Implemented Interfaces:
IStreamStore, IStreamStoreWithBinary

public class StreamStoreFile extends Object implements IStreamStoreWithBinary
IStreamStore implementation that persist the stream store data within the file system.
  • Constructor Details

    • StreamStoreFile

      public StreamStoreFile()
  • Method Details

    • init

      public void init(String rootDirectoryWS)
      Parameters:
      rootDirectoryWS - Directory (wiht ending slash) that is the base for all file operations.
    • init

      public void init(String rootDirectoryWS, boolean withTenantManagement)
      Parameters:
      rootDirectoryWS - Directory (wiht ending slash) that is the base for all file operations.
      withTenantManagement - Indicator if tenant management should be activated or not. By default tenant management is activated - there should be a really "good reason" not to use it.
    • getContainedStreams

      public List<String> getContainedStreams(String path, boolean withError)
      Querying is done gains the stream store directory + against the configuration directory of the web application (eclntjsfserver/config).
      Specified by:
      getContainedStreams in interface IStreamStore
    • getRootDirectory

      public String getRootDirectory()
      Root directory which is used by the stream store.
    • getContainedFolders

      public List<String> getContainedFolders(String path, boolean withError)
      Specified by:
      getContainedFolders in interface IStreamStore
    • readUTF8

      public String readUTF8(String path, boolean withError)
      Reading is done in the following sequence:
      1.) From stream store file system
      2.) From eclntjsfserver/config directory
      Specified by:
      readUTF8 in interface IStreamStore
    • writeUTF8

      public void writeUTF8(String path, String xml, boolean withError)
      Writing is done into the stream store directory.
      Specified by:
      writeUTF8 in interface IStreamStore
    • readData

      public byte[] readData(String path, boolean withError)
      Specified by:
      readData in interface IStreamStoreWithBinary
    • writeData

      public void writeData(String path, byte[] data, boolean withError)
      Specified by:
      writeData in interface IStreamStoreWithBinary
    • removeStream

      public void removeStream(String path, boolean withError)
      Removing is done from the stream store directory.
      Specified by:
      removeStream in interface IStreamStore
    • checkIfStreamExists

      public boolean checkIfStreamExists(String path, boolean withError)
      Specified by:
      checkIfStreamExists in interface IStreamStore