public class CommandLineAuthorizationCallback extends AbstractAuthorizationCallback implements Configurable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOGIN_PROMPT
The default prompt for the login name ("Login: ").
|
static String |
DEFAULT_PASSWORD_PROMPT
The default prompt for the password ("Password: ").
|
| Constructor and Description |
|---|
CommandLineAuthorizationCallback()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.apache.commons.configuration.Configuration config)
Configures the name callback.
|
String |
getLoginPrompt()
Returns the login prompt text.
|
String |
getName()
Asks the user on command line for name if no default name was set.
|
String |
getPassword()
Asks the user on command line for a password.
|
String |
getPasswordPrompt()
Returns the password prompt text.
|
void |
setLoginPrompt(String loginPrompt)
Sets a text for the login prompt.
|
void |
setPasswordPrompt(String passwordPrompt)
Sets a text for the password prompt.
|
setName, setPasswordpublic static final String DEFAULT_LOGIN_PROMPT
public static final String DEFAULT_PASSWORD_PROMPT
public CommandLineAuthorizationCallback()
public void configure(org.apache.commons.configuration.Configuration config)
throws org.apache.commons.configuration.ConfigurationException
configure in interface Configurableconfig - - configuration objectorg.apache.commons.configuration.ConfigurationException - - when configuration failspublic String getLoginPrompt()
public void setLoginPrompt(String loginPrompt)
loginPrompt - - the login prompt text to setpublic String getPasswordPrompt()
public void setPasswordPrompt(String passwordPrompt)
passwordPrompt - - the password prompt text to setpublic String getName()
getName in interface AuthorizationCallbackgetName in class AbstractAuthorizationCallbackpublic String getPassword()
getPassword in interface AuthorizationCallbackgetPassword in class AbstractAuthorizationCallbackCopyright © 2012. All Rights Reserved.