Class TextFileSystemViewCrudMapAdapter.Builder<Entry>

java.lang.Object
de.xima.fc.gui.common.model.file.TextFileSystemViewCrudMapAdapter.Builder<Entry>
Type Parameters:
Entry - The type of the file system entry.
Enclosing class:
TextFileSystemViewCrudMapAdapter<Entry>

public static final class TextFileSystemViewCrudMapAdapter.Builder<Entry> extends Object
Since:
8.3.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • build

      public CrudMapAdapter<String,String> build()
      Creates a new CrudMapAdapter that uses the configured ICommonFileSystem to read and write file text content. The map key is the file ID (as returned by the configured entry encoder), the map value is the file's text content. Uses the configured charset to encode and decode the binary data to/ from strings.

      Subsequent changes to the builder will not affect the returned CrudMapAdapter.

      Returns:
      The new CrudMapAdapter.
    • buildMap

      public Map<String,String> buildMap()
      Shortcut for building the CrudMapAdapter and creating a new CrudMap with that adapter.

      Uses the configured ICommonFileSystem to read and write file text content. The map key is the file ID (as returned by the configured entry encoder), the map value is the file's text content. Uses the configured charset to encode and decode the binary data to/ from strings.

      Subsequent changes to the builder will not affect the returned CrudMapAdapter.

      Returns:
      A new map using the built CrudMapAdapter.
    • charset

      Sets the charset to use for encoding and decoding the binary data to / from strings. If not set, UTF-8 will be used.
      Parameters:
      charset - The charset to use.
      Returns:
      This builder for chaining calls.
    • fileSystem

      Sets the file system with the text files. If not set, the map will be empty and cannot be filled.
      Parameters:
      fileSystem - The content view.
      Returns:
      This builder for chaining calls.