diff options
| author | Simon Rettberg | 2015-03-05 17:30:32 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2015-03-05 17:30:32 +0100 |
| commit | d6225d9c444822df05fa64191f4cba79f1bbd2c1 (patch) | |
| tree | edac0ea7bc34b2e729368511c51513ebbb355972 /dozentenmodul/src/main/java/gui/intro | |
| parent | [client] Restore RPC version check; add error message on thrift communication... (diff) | |
| download | tutor-module-d6225d9c444822df05fa64191f4cba79f1bbd2c1.tar.gz tutor-module-d6225d9c444822df05fa64191f4cba79f1bbd2c1.tar.xz tutor-module-d6225d9c444822df05fa64191f4cba79f1bbd2c1.zip | |
[client] Make SessionData a static class instead of a class that doesn't know if it's a singleton or not
Diffstat (limited to 'dozentenmodul/src/main/java/gui/intro')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/intro/Login_GUI.java | 20 | ||||
| -rw-r--r-- | dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java index d6f53a4f..e7e2611b 100644 --- a/dozentenmodul/src/main/java/gui/intro/Login_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/Login_GUI.java @@ -309,9 +309,9 @@ public class Login_GUI extends JInternalFrame { } // set Information - SessionData.session.setAuthToken(result.authToken); - SessionData.session.setSessionID(result.sessionId); - SessionData.session.setServerAdress(result.serverAddress); + SessionData.authToken = result.authToken; + SessionData.sessionID = result.sessionId; + SessionData.serverAdress = result.serverAddress; if (!ThriftManager.setSatellite(result.serverAddress)) { LOGGER.error("Setting satellite IP to '" + result.serverAddress + "' failed. Appears to be empty. Is the satellite IP returned from masterserver correct?"); @@ -372,9 +372,9 @@ public class Login_GUI extends JInternalFrame { person.verantwortlicher.setRole("Dozent"); authToken = ShibbolethECP.getResponse().token; ThriftManager.setSatellite(ShibbolethECP.getResponse().satellites.get("default")); - SessionData.session.setServerAdress(ShibbolethECP.getResponse().satellites.get("default")); - SessionData.session.setAuthToken(ShibbolethECP.getResponse().token); - SessionData.session.setSessionID(ShibbolethECP.getResponse().sessionId); + SessionData.serverAdress = ShibbolethECP.getResponse().satellites.get("default"); + SessionData.authToken = ShibbolethECP.getResponse().token; + SessionData.sessionID = ShibbolethECP.getResponse().sessionId; /* * Now postprocess successful login @@ -466,15 +466,15 @@ public class Login_GUI extends JInternalFrame { LOGGER.debug("Post-processing login ..."); // TODO here do all the session data stuff // TODO and the telling the sat Server who we are - LOGGER.debug("Checking token: " + SessionData.session.getAuthToken()); + LOGGER.debug("Checking token: " + SessionData.authToken); try { - boolean authenticated = ThriftManager.getSatClient().authenticated(SessionData.session.getAuthToken()); + boolean authenticated = ThriftManager.getSatClient().authenticated(SessionData.authToken); if (!authenticated) { JOptionPane.showMessageDialog(null, "Sessionübergabe an den Satelliten fehlgeschlagen.", "Fehler", JOptionPane.ERROR_MESSAGE); return; } - String pk_institution = ThriftManager.getSatClient().setInstitution(person.verantwortlicher.getHochschule(), SessionData.session.getAuthToken()); - ThriftManager.getSatClient().setPerson(person.verantwortlicher.getUserID(), SessionData.session.getAuthToken(), pk_institution); + String pk_institution = ThriftManager.getSatClient().setInstitution(person.verantwortlicher.getHochschule(), SessionData.authToken); + ThriftManager.getSatClient().setPerson(person.verantwortlicher.getUserID(), SessionData.authToken, pk_institution); } catch (TException e) { JOptionPane.showMessageDialog(null, "Unerwarteter Fehler.\n\n" + e.toString(), "Fehler", JOptionPane.ERROR_MESSAGE); LOGGER.error("Unexpected exception", e); diff --git a/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java b/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java index 42272091..3e71cc7b 100644 --- a/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java +++ b/dozentenmodul/src/main/java/gui/intro/MainMenue_GUI.java @@ -85,7 +85,7 @@ public class MainMenue_GUI extends JInternalFrame { e.printStackTrace(); } setTitle("bwLehrpool Suite - Connected Server: " - + SessionData.session.getServerAdress()+" - "+person.verantwortlicher.getUserID()); + + SessionData.serverAdress+" - "+person.verantwortlicher.getUserID()); setBounds(0, 0, 603, 722); |
