mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-18 02:00:58 +00:00
Implemented locale handling for sailorsInfoWebsiteURL selection and
moved the special locale dependent code for the legacy sailorsInfoWebsiteURL field to the automatic porting code
This commit is contained in:
1 parent
34536402ef
commit
55fee62053
4 files changed
+29
-16
No files matched your search
+2
@@ -99,6 +99,8 @@ public interface EventBase extends Named, WithDescription, Renamable, WithID, Wi
|
||||
boolean hasSailorsInfoWebsiteURL(Locale locale);
|
||||
|
||||
void removeSailorsInfoWebsiteURL(Locale locale);
|
||||
|
||||
URL getSailorsInfoWebsiteURLOrFallback(Locale locale);
|
||||
|
||||
Iterable<? extends LeaderboardGroupBase> getLeaderboardGroups();
|
||||
|
||||
|
||||
+11
@@ -230,6 +230,17 @@ public abstract class EventBaseImpl implements EventBase {
|
||||
public boolean hasSailorsInfoWebsiteURL(Locale locale) {
|
||||
return this.sailorsInfoWebsiteURLs.containsKey(locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getSailorsInfoWebsiteURLOrFallback(Locale locale) {
|
||||
final URL result;
|
||||
if(hasSailorsInfoWebsiteURL(locale)) {
|
||||
result = this.sailorsInfoWebsiteURLs.get(locale);
|
||||
} else {
|
||||
result = this.sailorsInfoWebsiteURLs.get(null);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<ImageDescriptor> getImages() {
|
||||
|
||||
Reference in new issue
Block a user