Merge branch 'bug3529' of ssh://sapsailing.com/home/trac/git into bug3529

This commit is contained in:
Kai Boernert committed 2017-01-12 17:40:30 +01:00
commit 5bc1becb36
5 files changed
+17 -7

No files matched your search

@@ -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<>();
}
}
@@ -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<>();
}
}
@@ -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<>();
}
}
@@ -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) {
@@ -162,7 +162,7 @@ public class UserSettingsStorageManager<S extends Settings> implements SettingsS
}
}
}
});
}, true);
}
private void continueRetrieveDefaultSettings(