Package org.apache.maven.api.services
Interface Prompter
- All Superinterfaces:
- Service
- All Known Implementing Classes:
- DefaultPrompter
Service used to interact with the end user.
- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptiondefault StringPrompts the user for a string.default StringPrompts the user for a string using a default value.default StringPrompts the user for a string using a list of possible values.Prompts the user for a string using a list of possible values and a default reply.promptForPassword(String message) Prompts the user for a password.voidshowMessage(String message) Displays a message to the user.
- 
Method Details- 
promptPrompts the user for a string.- Parameters:
- message- the message to display to the user
- Returns:
- the string entered by the user
- Throws:
- PrompterException- if an exception occurs
 
- 
prompt@Nonnull default String prompt(@Nullable String message, @Nullable String defaultReply) throws PrompterException Prompts the user for a string using a default value.- Parameters:
- message- the message to display
- defaultReply- the default reply value
- Returns:
- the string entered by the user
- Throws:
- PrompterException- if an exception occurs
 
- 
prompt@Nonnull default String prompt(@Nullable String message, @Nullable List<String> possibleValues) throws PrompterException Prompts the user for a string using a list of possible values.- Parameters:
- message- the message to display
- possibleValues- the list of possible values
- Returns:
- the string entered by the user
- Throws:
- PrompterException- if an exception occurs
 
- 
prompt@Nonnull String prompt(@Nullable String message, @Nullable List<String> possibleValues, @Nullable String defaultReply) throws PrompterException Prompts the user for a string using a list of possible values and a default reply.- Parameters:
- message- the message to display
- possibleValues- the list of possible values
- defaultReply- the default reply value
- Returns:
- the string entered by the user
- Throws:
- PrompterException- if an exception occurs
 
- 
promptForPasswordPrompts the user for a password.- Parameters:
- message- the message to display
- Returns:
- the password entered by the user
- Throws:
- PrompterException- if an exception occurs
 
- 
showMessageDisplays a message to the user.- Parameters:
- message- the message to display
- Throws:
- PrompterException- if an exception occurs
 
 
-