Package io.micronaut.chatbots.core
Class DefaultTextResourceLoader
- java.lang.Object
-
- io.micronaut.chatbots.core.DefaultTextResourceLoader
-
- All Implemented Interfaces:
TextResourceLoader
@Singleton public class DefaultTextResourceLoader extends java.lang.Object implements TextResourceLoader
UsersResourceLoader
to load a static resource associated with a command. For a command such as /help- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
-
Constructor Summary
Constructors Constructor Description DefaultTextResourceLoader(ChatbotsConfiguration chatbotsConfiguration, io.micronaut.core.io.ResourceResolver resourceResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<CommandResponse>
composeCommandResponse(@NotBlank java.lang.String command)
Composes a static command response for a given command.
-
-
-
Constructor Detail
-
DefaultTextResourceLoader
public DefaultTextResourceLoader(ChatbotsConfiguration chatbotsConfiguration, io.micronaut.core.io.ResourceResolver resourceResolver)
-
-
Method Detail
-
composeCommandResponse
@NonNull public java.util.Optional<CommandResponse> composeCommandResponse(@NonNull @NotBlank @NotBlank java.lang.String command)
Description copied from interface:TextResourceLoader
Composes a static command response for a given command.- Specified by:
composeCommandResponse
in interfaceTextResourceLoader
- Parameters:
command
- Command- Returns:
- static command response.
-
-