Class DefaultPrompter

java.lang.Object
org.apache.maven.internal.impl.DefaultPrompter
All Implemented Interfaces:
Service, Prompter

@Named @Singleton public class DefaultPrompter extends Object implements Prompter
  • Constructor Details

    • DefaultPrompter

      @Inject public DefaultPrompter(org.codehaus.plexus.PlexusContainer container)
  • Method Details

    • prompt

      public String prompt(String message, List<String> possibleValues, String defaultReply) throws PrompterException
      Description copied from interface: Prompter
      Prompts the user for a string using a list of possible values and a default reply.
      Specified by:
      prompt in interface Prompter
      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
    • promptForPassword

      public String promptForPassword(String message) throws PrompterException
      Description copied from interface: Prompter
      Prompts the user for a password.
      Specified by:
      promptForPassword in interface Prompter
      Parameters:
      message - the message to display
      Returns:
      the password entered by the user
      Throws:
      PrompterException - if an exception occurs
    • showMessage

      public void showMessage(String message) throws PrompterException
      Description copied from interface: Prompter
      Displays a message to the user.
      Specified by:
      showMessage in interface Prompter
      Parameters:
      message - the message to display
      Throws:
      PrompterException - if an exception occurs