org.eclnt.jsfserver.streamstore

## Class StreamStoreFile

- java.lang.Object
- - org.eclnt.jsfserver.streamstore.StreamStoreFile

- All Implemented Interfaces:
    IStreamStore, IStreamStoreWithBinary

      public class StreamStoreFile
      extends java.lang.Object
      implements IStreamStoreWithBinary

  `IStreamStore` implementation that persist the stream store data within the file system.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamStoreFile()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkIfStreamExists(java.lang.String path, boolean withError)`
    `java.util.List<java.lang.String>` | `getContainedFolders(java.lang.String path, boolean withError)`
    `java.util.List<java.lang.String>` | `getContainedStreams(java.lang.String path, boolean withError)` Querying is done gains the stream store directory + against the configuration directory of the web application (eclntjsfserver/config).
    `void` | `init(java.lang.String rootDirectoryWS)`
    `void` | `init(java.lang.String rootDirectoryWS, boolean withTenantManagement)`
    `byte[]` | `readData(java.lang.String path, boolean withError)`
    `java.lang.String` | `readUTF8(java.lang.String path, boolean withError)` Reading is done in the following sequence: 1.)
    `void` | `removeStream(java.lang.String path, boolean withError)` Removing is done from the stream store directory.
    `void` | `writeData(java.lang.String path, byte[] data, boolean withError)`
    `void` | `writeUTF8(java.lang.String path, java.lang.String xml, boolean withError)` Writing is done into the stream store directory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StreamStoreFile

          public StreamStoreFile()

  - ### Method Detail

    - #### init

          public void init(java.lang.String rootDirectoryWS)

      Parameters:
        `rootDirectoryWS` - Directory (wiht ending slash) that is the base for all file operations.

    - #### init

          public void init(java.lang.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 java.util.List<java.lang.String> getContainedStreams(java.lang.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`

    - #### getContainedFolders

          public java.util.List<java.lang.String> getContainedFolders(java.lang.String path,
                                                                      boolean withError)

      Specified by:
        `getContainedFolders` in interface `IStreamStore`

    - #### readUTF8

          public java.lang.String readUTF8(java.lang.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(java.lang.String path,
                                java.lang.String xml,
                                boolean withError)

      Writing is done into the stream store directory.
      Specified by:
        `writeUTF8` in interface `IStreamStore`

    - #### readData

          public byte[] readData(java.lang.String path,
                                 boolean withError)

      Specified by:
        `readData` in interface `IStreamStoreWithBinary`

    - #### writeData

          public void writeData(java.lang.String path,
                                byte[] data,
                                boolean withError)

      Specified by:
        `writeData` in interface `IStreamStoreWithBinary`

    - #### removeStream

          public void removeStream(java.lang.String path,
                                   boolean withError)

      Removing is done from the stream store directory.
      Specified by:
        `removeStream` in interface `IStreamStore`

    - #### checkIfStreamExists

          public boolean checkIfStreamExists(java.lang.String path,
                                             boolean withError)

      Specified by:
        `checkIfStreamExists` in interface `IStreamStore`

Copyright © CaptainCasa Gmbh. All Rights Reserved.