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>
Builder for a
TextFileSystemViewCrudMapAdapter.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newCrudMapAdapterthat uses the configuredICommonFileSystemto read and write file text content.buildMap()Shortcut for building theCrudMapAdapterand creating a newCrudMapwith that adapter.Sets the charset to use for encoding and decoding the binary data to / from strings.fileSystem(ICommonFileSystem<Entry> fileSystem) Sets the file system with the text files.
-
Method Details
-
build
Creates a newCrudMapAdapterthat uses the configuredICommonFileSystemto 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
Shortcut for building theCrudMapAdapterand creating a newCrudMapwith that adapter.Uses the configured
ICommonFileSystemto 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
public TextFileSystemViewCrudMapAdapter.Builder<Entry> fileSystem(ICommonFileSystem<Entry> 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.
-