public class GuiAuthorizationCallback extends AbstractAuthorizationCallback implements IConfigurable
Configuration:
<AuthorizationCallback class="rs.baselib.security.GuiAuthorizationCallback">
<!-- The default user name (optional). -->
<login>default-user-name</login>
<!-- The label to be used for user name text field (optional). -->
<login-label>a-login-label</login-label>
<!-- The label to be used for password field (optional). -->
<password-label>a-password-label</password-label>
<!-- The text to be shown explaining what to do (optional). -->
<prompt>a-short-sentence</prompt>
<!-- The title of the dialog (optional). -->
<title>a-title</title>
</AuthorizationCallback>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LOGIN_LABEL
The default label for the login name ("Login:").
|
static String |
DEFAULT_PASSWORD_LABEL
The default label for the password ("Password:").
|
static String |
DEFAULT_PROMPT
The default prompt text ("Please enter your Bugzilla login data!").
|
static String |
DEFAULT_TITLE
The default popup title ("Bugzilla Login").
|
| Constructor and Description |
|---|
GuiAuthorizationCallback()
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(Configuration config)
Configures the name callback.
|
String |
getLoginLabel()
Returns the login label text.
|
String |
getName()
Shows the popup if not done before and asks the user for credentials.
|
String |
getPassword()
Shows the popup if not done before and asks the user for credentials.
|
String |
getPasswordLabel()
Returns the password label text.
|
String |
getPrompt()
Returns the prompt text.
|
String |
getTitle()
Returns the popup title.
|
void |
setLoginLabel(String loginLabel)
Sets a text for the login label.
|
void |
setPasswordLabel(String passwordLabel)
Sets a text for the password label.
|
void |
setPrompt(String prompt)
Sets a text for the prompt.
|
void |
setTitle(String title)
Sets a text for the popup title.
|
protected void |
showPopup()
Shows the popup and asks for credentials.
|
setName, setPasswordpublic static final String DEFAULT_LOGIN_LABEL
public static final String DEFAULT_PASSWORD_LABEL
public static final String DEFAULT_PROMPT
public static final String DEFAULT_TITLE
public void configure(Configuration config) throws ConfigurationException
configure in interface IConfigurableconfig - - configuration objectConfigurationException - - when configuration failspublic String getLoginLabel()
public void setLoginLabel(String loginLabel)
loginLabel - - the login label text to setpublic String getPasswordLabel()
public void setPasswordLabel(String passwordLabel)
passwordLabel - - the password label text to setpublic String getPrompt()
public void setPrompt(String prompt)
prompt - - the prompt text to setpublic String getTitle()
public void setTitle(String title)
title - - the popup title to setpublic String getName()
getName in interface AuthorizationCallbackgetName in class AbstractAuthorizationCallbackpublic String getPassword()
getPassword in interface AuthorizationCallbackgetPassword in class AbstractAuthorizationCallbackprotected void showPopup()
Copyright © 2014. All rights reserved.