Class EntityFileSystem.BuilderStage4<Entry extends IFileSystemEntry<Entry>, PersistenceContext, Entity, Scope>
java.lang.Object
de.xima.fc.logic.filesystem.EntityFileSystem.BuilderStage4<Entry, PersistenceContext, Entity, Scope>
- Type Parameters:
Entry- The type of the file system entry.PersistenceContext- The type of the persistence context used to access the persistence layer.Entity- The type of the file entity.Scope- The type of the scope for the entities, such as a client or project.
- Enclosing class:
EntityFileSystem<Entry extends IFileSystemEntry<Entry>, PersistenceContext, Entity, Scope>
public static final class EntityFileSystem.BuilderStage4<Entry extends IFileSystemEntry<Entry>, PersistenceContext, Entity, Scope>
extends Object
A builder for configuring a new
EntityFileSystem.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new file system with the configured settings.Creates a new file system with the configured settings.Sets the context of the entities, e.g. the client for a client file entity or a form for a form file entity.Sets the user who is accessing the file system.
-
Method Details
-
build
Creates a new file system with the configured settings. Subsequent modifications to the builder will not affect the created file system.This method loads the initial set of entities from the database to populate the file system. If you already have the entities, consider using
build(Iterable)instead.- Returns:
- The new file system instance.
- Throws:
IOException- When the initial set of entities cannot be loaded.
-
build
public EntityFileSystem<Entry, PersistenceContext, Entity, Scope> build(Iterable<? extends Entity> initialEntities) Creates a new file system with the configured settings. Subsequent modifications to the builder will not affect the created file system.This method uses the given initial set of entities to populate the file system.
- Parameters:
initialEntities- The initial set of entities to populate the file system.- Returns:
- The new file system instance.
-
scope
Sets the context of the entities, e.g. the client for a client file entity or a form for a form file entity.- Parameters:
scope- The context for the entities.- Returns:
- This builder instance.
-
user
Sets the user who is accessing the file system. This is used for logging and protocolling purposes.- Parameters:
user- The user who is accessing the file system.- Returns:
- This builder instance for chaining method calls.
-