Class CredentialsDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class CredentialsDialog extends JDialog implements ActionListener
Dialog box for obtaining a user's credentials, where the dialog is simply a wrapping for a LoginCredentialsPanel.
Author:
James Murty, Nikolas Coukouma
See Also:
  • Constructor Details

    • CredentialsDialog

      public CredentialsDialog(Frame ownerFrame, boolean askForFriendlyName, Jets3tProperties jets3tProperties, HyperlinkActivatedListener hyperlinkListener)
      Displays a dialog box prompting for a user's credentials
      Parameters:
      ownerFrame - the frame that will own the dialog
      askForFriendlyName - if true, the dialog will prompt the user for a "friendly" name they want to give to their credentials - such as a nickname they can use to distinguish between multiple accounts.
      hyperlinkListener - the listener that will act on any hyperlink events triggered by the user clicking on HTTP links.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • isConfirmed

      public boolean isConfirmed()
      Returns:
      true if the OK button was pressed, false otherwise (ie if the dialog was cancelled)
    • getAccessKey

      public String getAccessKey()
      Returns:
      the Access Key provided by the user.
    • getSecretKey

      public String getSecretKey()
      Returns:
      the Secret Key provided by the user.
    • getUsingDevPay

      public boolean getUsingDevPay()
      Returns:
      whether or not DevPay authentication should be used
    • getAWSUserToken

      public String getAWSUserToken()
      Returns:
      the AWS User Token provided by the user.
    • getAWSProductToken

      public String getAWSProductToken()
      Returns:
      the AWS Product Token provided by the user.
    • getFriendlyName

      public String getFriendlyName()
      Returns:
      the Friendly Name (nickname) provided by the user, or an empty string if the user was not prompted to provide one (the askForFriendlyName option was false).
    • showDialog

      public static ProviderCredentials showDialog(Frame ownerFrame, boolean askForFriendlyName, boolean isTargetS3, Jets3tProperties jets3tProperties, HyperlinkActivatedListener hyperlinkListener)
      Displays a dialog box prompting for a user's AWS credentials.
      Parameters:
      ownerFrame - the frame that will own the dialog
      askForFriendlyName - if true, the dialog will prompt the user for a "friendly" name they want to give to their AWS credentials - such as a nickname they can use to distinguish between multiple AWS accounts.
      hyperlinkListener - the listener that will act on any hyperlink events triggered by the user clicking on HTTP links.