Package de.xima.fc.common.form_theme
Class StaticFormTheme.FormThemeFileMeta.Builder
- java.lang.Object
-
- de.xima.fc.common.form_theme.StaticFormTheme.FormThemeFileMeta.Builder
-
- Enclosing class:
- StaticFormTheme.FormThemeFileMeta
public static final class StaticFormTheme.FormThemeFileMeta.Builder extends Object
A builder for configuring the metadata of a file in a form theme.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaticFormTheme.FormThemeFileMeta
build()
Creates a new metadata instance for a file in a form theme with the current configuration.StaticFormTheme.FormThemeFileMeta.Builder
content(byte[] content)
Sets the content of the form theme file, seeIFormTheme#openFile
.StaticFormTheme.FormThemeFileMeta.Builder
content(String content)
Sets the content of the form theme file, seeIFormTheme#openFile
.StaticFormTheme.FormThemeFileMeta.Builder
content(String content, Charset charset)
Sets the content of the form theme file, seeIFormTheme#openFile
.StaticFormTheme.FormThemeFileMeta.Builder
fileLoader(StaticFormTheme.IFormThemeFileLoader fileLoader)
Sets the file loader for retrieving the content of the form theme file, seeIFormTheme#openFile
.StaticFormTheme.FormThemeFileMeta.Builder
inheritanceMode(EFormThemeFileInheritanceMode inheritanceMode)
Sets the inheritance mode for the form theme file, seeIFormTheme#getFileInheritanceMode
.StaticFormTheme.FormThemeFileMeta.Builder
offerCssClassesAsSuggestions()
Indicates that CSS classes of the form theme file should be offered as suggestions in the form designer.StaticFormTheme.FormThemeFileMeta.Builder
offerCssClassesAsSuggestions(boolean offerCssClassesAsSuggestions)
Sets whether the CSS classes of the form theme file should be offered as suggestions in the form designer.
-
-
-
Method Detail
-
build
public StaticFormTheme.FormThemeFileMeta build()
Creates a new metadata instance for a file in a form theme with the current configuration. Subsequent changes to the builder do not affect the returned metadata instance.- Returns:
- A new metadata instance for a file in a form theme.
-
content
public StaticFormTheme.FormThemeFileMeta.Builder content(String content)
Sets the content of the form theme file, seeIFormTheme#openFile
. Overrides any previously set content orfileLoader
. Uses the UTF-8 charset for encoding the content.- Parameters:
content
- The content of the form theme file.- Returns:
- This builder for chaining method calls.
-
content
public StaticFormTheme.FormThemeFileMeta.Builder content(String content, Charset charset)
Sets the content of the form theme file, seeIFormTheme#openFile
. Overrides any previously set content orfileLoader
.- Parameters:
content
- The content of the form theme file.charset
- The charset for encoding the content.- Returns:
- This builder for chaining method calls.
-
content
public StaticFormTheme.FormThemeFileMeta.Builder content(byte[] content)
Sets the content of the form theme file, seeIFormTheme#openFile
. Overrides any previously set content orfileLoader
.- Parameters:
content
- The content of the form theme file.- Returns:
- This builder for chaining method calls.
-
fileLoader
public StaticFormTheme.FormThemeFileMeta.Builder fileLoader(StaticFormTheme.IFormThemeFileLoader fileLoader)
Sets the file loader for retrieving the content of the form theme file, seeIFormTheme#openFile
. Overrides any previously set content or file loader.- Parameters:
fileLoader
- The file loader for the form theme file.- Returns:
- This builder for chaining method calls.
-
inheritanceMode
public StaticFormTheme.FormThemeFileMeta.Builder inheritanceMode(EFormThemeFileInheritanceMode inheritanceMode)
Sets the inheritance mode for the form theme file, seeIFormTheme#getFileInheritanceMode
. Overrides any previously set inheritance mode.- Parameters:
inheritanceMode
- The inheritance mode for the form theme file.- Returns:
- This builder for chaining method calls.
-
offerCssClassesAsSuggestions
public StaticFormTheme.FormThemeFileMeta.Builder offerCssClassesAsSuggestions()
Indicates that CSS classes of the form theme file should be offered as suggestions in the form designer. Users can add custom CSS classes to a form element. When this option is enabled, the form designer offers the CSS classes of the form theme file as suggestions. Overrides any previously set value.- Returns:
- This builder for chaining method calls.
-
offerCssClassesAsSuggestions
public StaticFormTheme.FormThemeFileMeta.Builder offerCssClassesAsSuggestions(boolean offerCssClassesAsSuggestions)
Sets whether the CSS classes of the form theme file should be offered as suggestions in the form designer. Users can add custom CSS classes to a form element. When this option is enabled, the form designer offers the CSS classes of the form theme file as suggestions. Overrides any previously set value.- Parameters:
offerCssClassesAsSuggestions
- Whether the CSS classes should be offered as suggestions.- Returns:
- This builder for chaining method calls.
-
-