mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
Merge branch 'bug3529' of ssh://sapsailing.com/home/trac/git into bug3529
This commit is contained in:
commit
5bc1becb36
5 files changed
+17
-7
No files matched your search
+2
-2
@@ -36,12 +36,12 @@ public abstract class AbstractValueListSetting<T> extends AbstractValueCollectio
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ValueCollectionValue<List<Value>> createValue() {
|
||||
protected final ValueCollectionValue<List<Value>> createValue() {
|
||||
return new ValueListValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<T> createDefaultValuesCollection() {
|
||||
protected final List<T> createDefaultValuesCollection() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -31,12 +31,12 @@ public abstract class AbstractValueSetSetting<T> extends AbstractValueCollection
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ValueCollectionValue<Set<Value>> createValue() {
|
||||
protected final ValueCollectionValue<Set<Value>> createValue() {
|
||||
return new ValueSetValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<T> createDefaultValuesCollection() {
|
||||
protected final Set<T> createDefaultValuesCollection() {
|
||||
return new HashSet<>();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -31,12 +31,12 @@ public abstract class ValueLinkedHashSetSetting<T> extends AbstractValueCollecti
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ValueCollectionValue<Set<Value>> createValue() {
|
||||
protected final ValueCollectionValue<Set<Value>> createValue() {
|
||||
return new LinkedHashSetValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<T> createDefaultValuesCollection() {
|
||||
protected final Set<T> createDefaultValuesCollection() {
|
||||
return new LinkedHashSet<>();
|
||||
}
|
||||
}
|
||||
+10
@@ -51,6 +51,8 @@ public class UserService {
|
||||
|
||||
private final Set<UserStatusEventHandler> handlers;
|
||||
|
||||
private boolean userInitiallyLoaded = false;
|
||||
|
||||
private UserDTO currentUser;
|
||||
|
||||
private final String id;
|
||||
@@ -182,6 +184,7 @@ public class UserService {
|
||||
|
||||
private void setCurrentUser(UserDTO result, final boolean notifyOtherInstances) {
|
||||
currentUser = result;
|
||||
userInitiallyLoaded = true;
|
||||
logger.info("User changed to " + (result == null ? "No User" : (result.getName() + " roles: "
|
||||
+ result.getRoles())));
|
||||
notifyUserStatusEventHandlers();
|
||||
@@ -191,7 +194,14 @@ public class UserService {
|
||||
}
|
||||
|
||||
public void addUserStatusEventHandler(UserStatusEventHandler handler) {
|
||||
addUserStatusEventHandler(handler, false);
|
||||
}
|
||||
|
||||
public void addUserStatusEventHandler(UserStatusEventHandler handler, boolean fireIfUserIsAlreadyAvailable) {
|
||||
handlers.add(handler);
|
||||
if(userInitiallyLoaded) {
|
||||
handler.onUserStatusChange(currentUser);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeUserStatusEventHandler(UserStatusEventHandler handler) {
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ public class UserSettingsStorageManager<S extends Settings> implements SettingsS
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
||||
private void continueRetrieveDefaultSettings(
|
||||
|
||||
Reference in new issue
Block a user