Package de.xima.fc.logic.filesystem
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 newEntityFileSystem
.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityFileSystem<Entry,PersistenceContext,Entity,Scope>
build()
Creates a new file system with the configured settings.EntityFileSystem<Entry,PersistenceContext,Entity,Scope>
build(Iterable<? extends Entity> initialEntities)
Creates a new file system with the configured settings.EntityFileSystem.BuilderStage4<Entry,PersistenceContext,Entity,Scope>
scope(Scope scope)
Sets the context of the entities, e.g.EntityFileSystem.BuilderStage4<Entry,PersistenceContext,Entity,Scope>
user(String user)
Sets the user who is accessing the file system.
-
-
-
Method Detail
-
build
public EntityFileSystem<Entry,PersistenceContext,Entity,Scope> build() throws IOException
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
public EntityFileSystem.BuilderStage4<Entry,PersistenceContext,Entity,Scope> scope(Scope 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
public EntityFileSystem.BuilderStage4<Entry,PersistenceContext,Entity,Scope> user(String 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.
-
-