|
18 | 18 | import java.util.List;
|
19 | 19 | import java.util.logging.Level;
|
20 | 20 | import java.util.logging.Logger;
|
| 21 | +import org.apache.http.auth.Credentials; |
21 | 22 | import org.openide.util.Exceptions;
|
22 | 23 |
|
23 | 24 | /**
|
@@ -60,22 +61,22 @@ public RefreshCoursesAction addListener(BgTaskListener<List<Course>> listener) {
|
60 | 61 | }
|
61 | 62 |
|
62 | 63 | public void run() {
|
63 |
| - Credentials credentials = new Credentials(this.tmcSettings.getUsername(), |
64 |
| - this.tmcSettings.getPassword()); |
65 |
| - System.out.println(credentials); |
66 |
| - ListenableFuture<Boolean> login = this.tmcCore.login(credentials, tmcSettings.getServerBaseUrl()); |
67 |
| - Futures.addCallback(login, new FutureCallback<Boolean>() { |
68 |
| - @Override |
69 |
| - public void onSuccess(Boolean v) { |
70 |
| - System.out.println("TOIMIIIII: " + v); |
71 |
| - } |
72 |
| - |
73 |
| - @Override |
74 |
| - public void onFailure(Throwable thrwbl) { |
75 |
| - System.out.println("LOGIN LATAUS FEILASI1: " ); |
76 |
| - Exceptions.printStackTrace(thrwbl); |
77 |
| - } |
78 |
| - }); |
| 64 | +// Credentials credentials = new Credentials(this.tmcSettings.getUsername(), |
| 65 | +// this.tmcSettings.getPassword()) {}; |
| 66 | +// System.out.println(credentials); |
| 67 | +// ListenableFuture<Boolean> login = this.tmcCore.login(credentials, tmcSettings.getServerBaseUrl()); |
| 68 | +// Futures.addCallback(login, new FutureCallback<Boolean>() { |
| 69 | +// @Override |
| 70 | +// public void onSuccess(Boolean v) { |
| 71 | +// System.out.println("TOIMIIIII: " + v); |
| 72 | +// } |
| 73 | +// |
| 74 | +// @Override |
| 75 | +// public void onFailure(Throwable thrwbl) { |
| 76 | +// System.out.println("LOGIN LATAUS FEILASI1: " ); |
| 77 | +// Exceptions.printStackTrace(thrwbl); |
| 78 | +// } |
| 79 | +// }); |
79 | 80 | }
|
80 | 81 |
|
81 | 82 | public void oldRun() {
|
|
0 commit comments