Revision 41e2f693
Added by Cherian Mathew over 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/LoginManager.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
31 | 31 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
32 | 32 |
import eu.etaxonomy.taxeditor.model.IContextListener; |
33 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
|
33 | 34 |
|
34 | 35 |
/** |
35 | 36 |
* <p>LoginManager class.</p> |
... | ... | |
96 | 97 |
return true; |
97 | 98 |
} |
98 | 99 |
catch(BadCredentialsException e){ |
99 |
AbstractUtility.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Bad Credentials.");
|
|
100 |
MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Bad Credentials.");
|
|
100 | 101 |
} |
101 | 102 |
catch(LockedException e){ |
102 |
AbstractUtility.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Account is locked.");
|
|
103 |
MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Account is locked.");
|
|
103 | 104 |
} |
104 | 105 |
catch(IllegalArgumentException e){ |
105 |
AbstractUtility.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Username and/or Password empty.");
|
|
106 |
MessagingUtils.warningDialog("Could not authenticate", this, "Could not authenticate. Reason: Username and/or Password empty.");
|
|
106 | 107 |
} |
107 | 108 |
return false; |
108 | 109 |
} |
Also available in: Unified diff
Moved all logging and dialog functionality to the new class MessagingUtils.
Refactoring code to adapt to above change.
Added new custom error dialog - CdmErrorDialog
Added runtime exception handling to the ApplicationWorkbenchAdvisor by adding a custom status handler