Package io.micronaut.chatbots.core
Class ChatbotsConfigurationProperties
java.lang.Object
io.micronaut.chatbots.core.ChatbotsConfigurationProperties
- All Implemented Interfaces:
ChatbotsConfiguration
,io.micronaut.core.util.Toggleable
@ConfigurationProperties("micronaut.chatbots")
public class ChatbotsConfigurationProperties
extends Object
implements ChatbotsConfiguration
ConfigurationProperties
implementation of ChatbotsConfiguration
.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
The default BOT commands folder.Fields inherited from interface io.micronaut.chatbots.core.ChatbotsConfiguration
PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
@Nullable List<FileExtension>
boolean
void
setEnabled
(boolean enabled) Whether chatbots is enabled.void
The folder to look for bot commands.void
setPossibleStaticCommandExtensions
(@Nullable List<FileExtension> possibleStaticCommandExtensions) Possible static command file extensions.
-
Field Details
-
DEFAULT_FOLDER
The default BOT commands folder.- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
ChatbotsConfigurationProperties
public ChatbotsConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Whether chatbots is enabled. Default value (true).- Parameters:
enabled
- True if view rendering is enabled
-
getFolder
- Specified by:
getFolder
in interfaceChatbotsConfiguration
- Returns:
- The resources' folder where static commands should be searched for.
-
setFolder
The folder to look for bot commands.- Parameters:
folder
- The folder
-
getPossibleStaticCommandExtensions
- Specified by:
getPossibleStaticCommandExtensions
in interfaceChatbotsConfiguration
- Returns:
- the command file extensions candidates for static resource. For a command such as
/help
and extensions HTML and MARKDOWN, possible files arehelp.md
,help.markdown
, andhelp.html
-
setPossibleStaticCommandExtensions
public void setPossibleStaticCommandExtensions(@Nullable @Nullable List<FileExtension> possibleStaticCommandExtensions) Possible static command file extensions. Default values MARKDOWN, HTML, TXT- Parameters:
possibleStaticCommandExtensions
- Possible static command file extensions.
-