Class DefaultPromptExecutionReplacerSettings.Builder
java.lang.Object
de.xima.fc.prompt.service.defaults.DefaultPromptExecutionReplacerSettings.Builder
- Enclosing class:
DefaultPromptExecutionReplacerSettings
- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a settings instance with the configured values.contextResolver(IPromptExecutionReplacerContextResolver contextResolver) Sets the context resolver to use.escaper(IPromptExecutionReplacerEscaper escaper) Sets the escaper to use.Sets all replace options to true.Enables the replacement of context placeholders.replaceContext(boolean replaceContext) Sets whether to replace context placeholders.Enables the replacement of form placeholders.replaceForm(boolean replaceForm) Sets whether to replace form placeholders.Enables the replacement of i18n placeholders.replaceI18N(boolean replaceI18N) Sets whether to replace i18n placeholders.Enables the replacement of session placeholders.replaceSession(boolean replaceSession) Sets whether to replace session placeholders.Enables the replacement of system placeholders.replaceSystem(boolean replaceSystem) Sets whether to replace system placeholders.Enables the replacement of template placeholders.replaceTemplate(boolean replaceTemplate) Sets whether to replace template placeholders.
-
Method Details
-
build
Builds a settings instance with the configured values.- Returns:
- The built instance.
-
contextResolver
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder contextResolver(IPromptExecutionReplacerContextResolver contextResolver) Sets the context resolver to use. Defaults to a no-op resolver.- Parameters:
contextResolver- The context resolver to use.- Returns:
- The builder for chaining.
-
escaper
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder escaper(IPromptExecutionReplacerEscaper escaper) Sets the escaper to use. Defaults to a no-op escaper that does not escape anything.- Parameters:
escaper- The escaper to use.- Returns:
- The builder for chaining.
-
replaceAll
Sets all replace options to true.- Returns:
- The builder for chaining.
- See Also:
-
replaceContext
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceContext(boolean replaceContext) Sets whether to replace context placeholders. Defaults to false.- Parameters:
replaceContext- Whether to replace context placeholders.- Returns:
- The builder for chaining.
-
replaceContext
Enables the replacement of context placeholders. Defaults to false.- Returns:
- The builder for chaining.
-
replaceForm
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceForm(boolean replaceForm) Sets whether to replace form placeholders. Defaults to false.- Parameters:
replaceForm- Whether to replace form placeholders.- Returns:
- The builder for chaining.
-
replaceForm
Enables the replacement of form placeholders. Defaults to false.- Returns:
- The builder for chaining.
-
replaceI18N
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceI18N(boolean replaceI18N) Sets whether to replace i18n placeholders. Defaults to false.- Parameters:
replaceI18N- Whether to replace i18n placeholders.- Returns:
- The builder for chaining.
-
replaceI18N
Enables the replacement of i18n placeholders. Defaults to false.- Returns:
- The builder for chaining.
-
replaceSession
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceSession(boolean replaceSession) Sets whether to replace session placeholders. Defaults to false.- Parameters:
replaceSession- Whether to replace session placeholders.- Returns:
- The builder for chaining.
-
replaceSession
Enables the replacement of session placeholders. Defaults to false.- Returns:
- The builder for chaining.
-
replaceSystem
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceSystem(boolean replaceSystem) Sets whether to replace system placeholders. Defaults to false.- Parameters:
replaceSystem- Whether to replace system placeholders.- Returns:
- The builder for chaining.
-
replaceSystem
Enables the replacement of system placeholders. Defaults to false.- Returns:
- The builder for chaining.
-
replaceTemplate
@CanIgnoreReturnValue public DefaultPromptExecutionReplacerSettings.Builder replaceTemplate(boolean replaceTemplate) Sets whether to replace template placeholders. Defaults to false.- Parameters:
replaceTemplate- Whether to replace template placeholders.- Returns:
- The builder for chaining.
-
replaceTemplate
Enables the replacement of template placeholders. Defaults to false.- Returns:
- The builder for chaining.
-