3737import com .mirth .connect .plugins .MultiFactorAuthenticationClientPlugin ;
3838import com .mirth .connect .util .MirthSSLUtil ;
3939
40- public class LoginPanel extends javax .swing .JFrame {
40+ public class DefaultLoginPanel extends javax .swing .JFrame {
4141
4242 private Client client ;
4343 private static final String ERROR_MESSAGE = "There was an error connecting to the server at the specified address. Please verify that the server is up and running." ;
44- private static LoginPanel instance = null ;
44+ private static DefaultLoginPanel instance = null ;
4545
46- private LoginPanel () {
46+ private DefaultLoginPanel () {
4747 initComponents ();
4848 DisplayUtil .setResizable (this , false );
4949 jLabel2 .setForeground (UIConstants .HEADER_TITLE_TEXT_COLOR );
@@ -81,10 +81,10 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
8181 errorTextArea .setDisabledTextColor (Color .RED );
8282 }
8383
84- public static LoginPanel getInstance () {
85- synchronized (LoginPanel .class ) {
84+ public static DefaultLoginPanel getInstance () {
85+ synchronized (DefaultLoginPanel .class ) {
8686 if (instance == null ) {
87- instance = new LoginPanel ();
87+ instance = new DefaultLoginPanel ();
8888 }
8989 return instance ;
9090 }
@@ -448,8 +448,8 @@ public Void doInBackground() {
448448 // If SUCCESS or SUCCESS_GRACE_PERIOD
449449 if (loginStatus != null && loginStatus .isSuccess ()) {
450450 if (!handleSuccess (loginStatus )) {
451- LoginPanel .getInstance ().setVisible (false );
452- LoginPanel .getInstance ().initialize (PlatformUI .SERVER_URL , PlatformUI .CLIENT_VERSION , "" , "" );
451+ DefaultLoginPanel .getInstance ().setVisible (false );
452+ DefaultLoginPanel .getInstance ().initialize (PlatformUI .SERVER_URL , PlatformUI .CLIENT_VERSION , "" , "" );
453453 }
454454 } else {
455455 // Assume failure unless overridden by a plugin
@@ -462,13 +462,13 @@ public Void doInBackground() {
462462 String updatedUsername = StringUtils .defaultString (loginStatus .getUpdatedUsername (), username .getText ());
463463 MultiFactorAuthenticationClientPlugin plugin = (MultiFactorAuthenticationClientPlugin ) Class .forName (extendedLoginStatus .getClientPluginClass ()).newInstance ();
464464
465- loginStatus = plugin .authenticate (LoginPanel .this , client , updatedUsername , loginStatus );
465+ loginStatus = plugin .authenticate (DefaultLoginPanel .this , client , updatedUsername , loginStatus );
466466
467467 if (loginStatus != null && loginStatus .isSuccess ()) {
468468 errorOccurred = false ;
469469 if (!handleSuccess (loginStatus )) {
470- LoginPanel .getInstance ().setVisible (false );
471- LoginPanel .getInstance ().initialize (PlatformUI .SERVER_URL , PlatformUI .CLIENT_VERSION , "" , "" );
470+ DefaultLoginPanel .getInstance ().setVisible (false );
471+ DefaultLoginPanel .getInstance ().initialize (PlatformUI .SERVER_URL , PlatformUI .CLIENT_VERSION , "" , "" );
472472 }
473473 }
474474 }
@@ -504,7 +504,7 @@ private boolean handleSuccess(LoginStatus loginStatus) throws ClientException {
504504 PublicServerSettings publicServerSettings = client .getPublicServerSettings ();
505505
506506 if (publicServerSettings .getLoginNotificationEnabled () == true ) {
507- CustomBannerPanelDialog customBannerPanelDialog = new CustomBannerPanelDialog (LoginPanel .getInstance (), "Login Notification" , publicServerSettings .getLoginNotificationMessage ());
507+ CustomBannerPanelDialog customBannerPanelDialog = new CustomBannerPanelDialog (DefaultLoginPanel .getInstance (), "Login Notification" , publicServerSettings .getLoginNotificationMessage ());
508508 boolean isAccepted = customBannerPanelDialog .isAccepted ();
509509
510510 if (isAccepted == true ) {
@@ -559,7 +559,7 @@ private boolean handleSuccess(LoginStatus loginStatus) throws ClientException {
559559 PlatformUI .USER_NAME = StringUtils .defaultString (loginStatus .getUpdatedUsername (), username .getText ());
560560 setStatus ("Authenticated..." );
561561 new Mirth (client );
562- LoginPanel .getInstance ().setVisible (false );
562+ DefaultLoginPanel .getInstance ().setVisible (false );
563563
564564 User currentUser = PlatformUI .MIRTH_FRAME .getCurrentUser (PlatformUI .MIRTH_FRAME );
565565 Properties userPreferences = new Properties ();
0 commit comments