Package de.xima.fc.workflow
Class Setting.Builder<TValue>
java.lang.Object
de.xima.fc.workflow.Setting.Builder<TValue>
- Type Parameters:
TValue
- Type of the settings' value.
- All Implemented Interfaces:
org.apache.commons.lang3.builder.Builder<Setting<TValue>>
public static class Setting.Builder<TValue>
extends Object
implements org.apache.commons.lang3.builder.Builder<Setting<TValue>>
A builder for configuring the options of a
Setting
. Only the name and value of a setting can be edited,
other options are set when the setting is created.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Makes the setting deletable.deletable
(boolean deletable) description
(String localizedDescription) localizedName
(String localizedName) Makes the name of the setting editable.nameEditable
(boolean nameEditable) Makes the name of the setting not editable.required()
Marks the setting as required, i.e. a value has to be entered.required
(boolean required) Marks the value of the setting as editable.valueEditable
(boolean valueEditable) Marks the value of the setting as not editable.
-
Constructor Details
-
Builder
public Builder()Creates a new setting builder with the default values.
-
-
Method Details
-
build
- Specified by:
build
in interfaceorg.apache.commons.lang3.builder.Builder<TValue>
-
deletable
Makes the setting deletable. Settings are deletable by default.- Returns:
- this for chaining
- See Also:
-
deletable
- Parameters:
deletable
- Whether the setting can be deleted. Settings are deletable by default.- Returns:
- this for chaining
- See Also:
-
description
- Parameters:
localizedDescription
- A human-readable description of the setting. Default to no description.- Returns:
- this for chaining
- See Also:
-
localizedName
- Parameters:
localizedName
- A human-readable name of the setting. Defaults to the name of the parameter.- Returns:
- this for chaining
- See Also:
-
name
- Parameters:
name
- The technical name of the setting. By default no name is set (and must be entered by the user). If you assign a predefined name, you should setnameEditable()
totrue
.- Returns:
- this for chaining
- See Also:
-
nameEditable
Makes the name of the setting editable. Defaults totrue
.- Returns:
- this for chaining
- See Also:
-
nameEditable
- Parameters:
nameEditable
- Whether the name of the setting is editable. Defaults totrue
. When you set this tofalse
, you should also setname(String)
.- Returns:
- this for chaining
- See Also:
-
nameNotEditable
Makes the name of the setting not editable. Defaults totrue
. When you use this, you should also setname(String)
for the setting.- Returns:
- this for chaining
- See Also:
-
required
Marks the setting as required, i.e. a value has to be entered. Default tofalse
.- Returns:
- this for chaining.
- See Also:
-
required
- Parameters:
required
- Whether the setting is required, i.e. whether a value has to be entered. Default tofalse
.- Returns:
- this for chaining.
- See Also:
-
value
- Parameters:
value
- The initial value for the setting. Defaults tonull
.- Returns:
- this for chaining.
- See Also:
-
valueEditable
Marks the value of the setting as editable. Defaults totrue
.- Returns:
- this for chaining
- See Also:
-
valueEditable
- Parameters:
valueEditable
- Whether the value of the setting is editable. Defaults totrue
. When you set this tofalse
, you should either set a defaultvalue(Object)
or setrequired(boolean)
tofalse
.- Returns:
- this for chaining
- See Also:
-
valueNotEditable
Marks the value of the setting as not editable. Defaults totrue
. When you use this, you should either set a defaultvalue(Object)
or setrequired(boolean)
tofalse
.- Returns:
- this for chaining
- See Also:
-