File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
tmc-plugin/src/fi/helsinki/cs/tmc/coreimpl Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 46
46
<dependency >
47
47
<groupId >${project.groupId} </groupId >
48
48
<artifactId >core</artifactId >
49
- <version >0.9.13 -SNAPSHOT</version >
49
+ <version >0.10.0 -SNAPSHOT</version >
50
50
</dependency >
51
51
<dependency >
52
52
<groupId >${project.groupId} </groupId >
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public class TmcCoreSettingsImpl implements TmcSettings {
36
36
private static final String PREF_ERROR_MSG_LOCALE = "errorMsgLocale" ;
37
37
private static final String PREF_RESOLVE_DEPENDENCIES = "resolveDependencies" ;
38
38
private static final String PREF_SEND_DIAGNOSTICS = "sendDiagnostics" ;
39
+ private static final String PREF_OAUTH_TOKEN = "oauthToken" ;
39
40
40
41
private static PersistableSettings settings = PersistableSettings .forModule (TmcCoreSettingsImpl .class );
41
42
@@ -187,8 +188,8 @@ public void setUsername(String username) {
187
188
}
188
189
189
190
@ Override
190
- public String getPassword () {
191
- return unsavedPassword ;
191
+ public Optional < String > getPassword () {
192
+ return Optional . fromNullable ( unsavedPassword ) ;
192
193
}
193
194
194
195
public void setPassword (String password ) {
@@ -280,6 +281,21 @@ public boolean getSendDiagnostics() {
280
281
return settings .get (PREF_SEND_DIAGNOSTICS , "1" ).equals ("1" );
281
282
}
282
283
284
+ @ Override
285
+ public Optional <String > getToken () {
286
+ return Optional .fromNullable (settings .get (PREF_OAUTH_TOKEN , null ));
287
+ }
288
+
289
+ @ Override
290
+ public void setToken (String token ) {
291
+ settings .put (PREF_OAUTH_TOKEN , token );
292
+ }
293
+
294
+ @ Override
295
+ public String getOauthSecret () {
296
+ return ;
297
+ }
298
+
283
299
private Locale parseLocale (String s , Locale dflt ) {
284
300
if (s .isEmpty ()) {
285
301
return dflt ;
You can’t perform that action at this time.
0 commit comments