java/com.sap.sse.branding/src/com/sap/sse/branding/shared/BrandingConfiguration.java
... ...
@@ -2,69 +2,247 @@ package com.sap.sse.branding.shared;
2 2
3 3
import java.util.Optional;
4 4
5
+/**
6
+ * Describes all branding aspects that may appear in the UI (logo, titles, links, localized texts, etc.).
7
+ * <p>
8
+ * <strong>Locale Parameter Conventions</strong><br>
9
+ * Several methods accept {@code Optional<String> locale}. Implementations SHOULD interpret this value as a
10
+ * BCP-47 language tag (e.g., {@code "en"}, {@code "de-DE"}). If {@link Optional#empty()} is provided, an
11
+ * implementation SHOULD return a sensible default (e.g., English or system default). Implementations MAY ignore
12
+ * the locale for non-localized assets (like image URLs).
13
+ */
5 14
public interface BrandingConfiguration {
15
+
6 16
/**
7 17
* The ID by which to find or set this configuration in {@code BrandingConfigurationService#setActiveBrandingConfigurationById(String)}
18
+ * <p>Used by the system property {@code -Dcom.sap.sse.branding=<ID>} and as the OSGi service property
19
+ * {@code com.sap.sse.branding} to select the active branding.
20
+ *
21
+ * @return non-null brand ID (e.g., {@code "SAP"} or {@code "YOUR_BRAND_NAME"}).
8 22
*/
9 23
String getId();
10 24
25
+ /**
26
+ * Localized brand display title (e.g., {@code "SAP"}).
27
+ *
28
+ * @param locale see “Locale Parameter Conventions”.
29
+ * @return non-null (possibly empty) title.
30
+ */
11 31
String getBrandTitle(Optional<String> locale);
12 32
33
+ /**
34
+ * Main brand logo URL used in headers/favicons or other primary placements.
35
+ *
36
+ * @param locale see “Locale Parameter Conventions”.
37
+ * @return URL string (absolute or context-relative).
38
+ */
13 39
String getDefaultBrandingLogoURL(Optional<String> locale);
14 40
41
+ /**
42
+ * Grayscale/transparent logo URL for the Race Tracking window.
43
+ *
44
+ * @param locale see “Locale Parameter Conventions”.
45
+ * @return URL string. Empty to hide/fallback.
46
+ */
15 47
String getGreyTransparentLogoURL(Optional<String> locale);
16
-
48
+
49
+ /**
50
+ * “Solutions in Sailing” section image URL.
51
+ *
52
+ * @return URL string. Empty to hide.
53
+ */
17 54
String getSolutionsInSailingImageURL();
18
-
55
+
56
+ /**
57
+ * Trimmed variant of the “Solutions in Sailing” image URL.
58
+ *
59
+ * @return URL string. Empty to hide.
60
+ */
19 61
String getSoutionsInSailingTrimmedImageURL();
20
-
62
+
63
+ /**
64
+ * Trimmed image URL for the Sailing Race Manager app tile/card.
65
+ *
66
+ * @return URL string. Empty to hide.
67
+ */
21 68
String getSailingRaceManagerAppTrimmedImageURL();
22
-
69
+
70
+ /**
71
+ * Image URL for the Sail In Sight app tile/card.
72
+ *
73
+ * @return URL string. Empty to hide.
74
+ */
23 75
String getSailInSightAppImageURL();
24
-
76
+
77
+ /**
78
+ * Image URL for the Sailing Race Manager app tile/card.
79
+ *
80
+ * @return URL string. Empty to hide.
81
+ */
25 82
String getSailingRaceManagerAppImageURL();
26
-
83
+
84
+ /**
85
+ * Image URL for the Sailing Simulator app tile/card.
86
+ *
87
+ * @return URL string. Empty to hide.
88
+ */
27 89
String getSailingSimulatorImageURL();
28
-
90
+
91
+ /**
92
+ * Trimmed image URL for the Sailing Simulator tile/card.
93
+ *
94
+ * @return URL string. Empty to hide.
95
+ */
29 96
String getSailingSimulatorTrimmedImageURL();
30 97
98
+ /**
99
+ * Image URL for the Buoy Pinger app tile/card.
100
+ *
101
+ * @return URL string. Empty to hide.
102
+ */
31 103
String getBuoyPingerAppImageURL();
32 104
105
+ /**
106
+ * Image URL for the Sailing Analytics tile/card.
107
+ *
108
+ * @return URL string. Empty to hide.
109
+ */
33 110
String getSailingAnalyticsImageURL();
34 111
112
+ /**
113
+ * Localized “Read more” label for the Sailing Analytics tile/card.
114
+ *
115
+ * @param locale see “Locale Parameter Conventions”.
116
+ * @return localized text. Empty to hide.
117
+ */
35 118
String getSailingAnalyticsReadMoreText(Optional<String> locale);
36 119
120
+ /**
121
+ * Localized “Sailing” label combined with the brand (e.g., “SAP Sailing”).
122
+ *
123
+ * @param locale see “Locale Parameter Conventions”.
124
+ * @return localized text. May be empty.
125
+ */
37 126
String getSailingAnalyticsSailing(Optional<String> locale);
38
-
127
+
128
+ /**
129
+ * Footer copyright text.
130
+ *
131
+ * @return plain text. Empty to hide.
132
+ */
39 133
String getFooterCopyright();
40
-
134
+
135
+ /**
136
+ * Footer link to the brand’s privacy statement.
137
+ *
138
+ * @return absolute URL. Empty to hide.
139
+ */
41 140
String getFooterPrivacyLink();
42
-
141
+
142
+ /**
143
+ * Footer link to jobs/careers.
144
+ *
145
+ * @return absolute URL. Empty to hide.
146
+ */
43 147
String getFooterJobsLink();
44
-
148
+
149
+ /**
150
+ * Footer link to support/help.
151
+ *
152
+ * @return absolute URL. Empty to hide.
153
+ */
45 154
String getFooterSupportLink();
46
-
155
+
156
+ /**
157
+ * Localized footer label inviting users to explore sports content (e.g., “Sports on …”).
158
+ *
159
+ * @param locale see “Locale Parameter Conventions”.
160
+ * @return localized text. Empty to hide.
161
+ */
47 162
String getSportsOn(Optional<String> locale);
48
-
163
+
164
+ /**
165
+ * Localized footer label inviting users to follow the brand’s sports channels (e.g., “Follow … Sports”).
166
+ *
167
+ * @param locale see “Locale Parameter Conventions”.
168
+ * @return localized text. Empty to hide.
169
+ */
49 170
String getFollowSports(Optional<String> locale);
50
-
171
+
172
+ /**
173
+ * Brand’s Facebook page URL.
174
+ *
175
+ * @return absolute URL. Empty to hide the icon/link.
176
+ */
51 177
String getFacebookLink();
52
-
178
+
179
+ /**
180
+ * Brand’s X (formerly Twitter) profile URL.
181
+ *
182
+ * @return absolute URL. Empty to hide the icon/link.
183
+ */
53 184
String getxLink();
54
-
185
+
186
+ /**
187
+ * Brand’s Instagram profile URL.
188
+ *
189
+ * @return absolute URL. Empty to hide the icon/link.
190
+ */
55 191
String getInstagramLink();
56
-
192
+
193
+ /**
194
+ * Localized headline for the “Welcome to Sailing Analytics” widget.
195
+ *
196
+ * @param locale see “Locale Parameter Conventions”.
197
+ * @return localized text. Empty to hide the widget.
198
+ */
57 199
String getWelcomeToSailingAnalytics(Optional<String> locale);
58
-
200
+
201
+ /**
202
+ * Localized body text for the “Welcome to Sailing Analytics” widget.
203
+ *
204
+ * @param locale see “Locale Parameter Conventions”.
205
+ * @return localized text. Empty to hide the widget body.
206
+ */
59 207
String getWelcomeToSailingAnalyticsBody(Optional<String> locale);
60
-
208
+
209
+ /**
210
+ * Image URL for “More login information” → Notifications.
211
+ * <p>Note: This dialog may require logging out to test locally.</p>
212
+ *
213
+ * @return URL string. Empty to hide.
214
+ */
61 215
String getMoreLoginInformationNotificationsURL();
62
-
216
+
217
+ /**
218
+ * Image URL for “More login information” → Settings.
219
+ * <p>Note: This dialog may require logging out to test locally.</p>
220
+ *
221
+ * @return URL string. Empty to hide.
222
+ */
63 223
String getMoreLoginInformationSettingsURL();
64
-
224
+
225
+ /**
226
+ * Image URL for “More login information” → Sailor Profiles.
227
+ * <p>Note: This dialog may require logging out to test locally.</p>
228
+ *
229
+ * @return URL string. Empty to hide.
230
+ */
65 231
String getMoreLoginInformationSailorProfilesURL();
66
-
232
+
233
+ /**
234
+ * Image URL for “More login information” → Simulator.
235
+ * <p>Note: This dialog may require logging out to test locally.</p>
236
+ *
237
+ * @return URL string. Empty to hide.
238
+ */
67 239
String getMoreLoginInformationSimulatorURL();
68
-
240
+
241
+ /**
242
+ * Localized HTML/text for “{Brand} in Sailing” (Solutions tab). Implementations return sanitized HTML.
243
+ *
244
+ * @param locale see “Locale Parameter Conventions”.
245
+ * @return HTML or plain text. Empty to hide.
246
+ */
69 247
String getInSailingContent(Optional<String> locale);
70 248
}