File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
sources/core/src/main/java/tools/dynamia/modules/saas Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 2424
2525import java .util .Locale ;
2626
27+ /**
28+ * AccountLocaleProvider is an implementation of {@link LocaleProvider} for SaaS environments.
29+ * <p>
30+ * Provides the default {@link Locale} based on the current account session context.
31+ * The priority for this provider is set to 10, making it suitable for account-level locale resolution.
32+ * <p>
33+ * If the account session or locale cannot be resolved, this provider returns null.
34+ *
35+ * @author Mario
36+ */
2737@ Provider
2838public class AccountLocaleProvider implements LocaleProvider {
29-
39+ /**
40+ * Logger for this provider, using SLF4J.
41+ */
3042 private final LoggingService logger = new SLF4JLoggingService (AccountLocaleProvider .class );
3143
44+ /**
45+ * Returns the priority of this provider. Lower values indicate higher priority.
46+ *
47+ * @return the priority value (10)
48+ */
3249 @ Override
3350 public int getPriority () {
3451 return 10 ;
3552 }
3653
54+ /**
55+ * Returns the default {@link Locale} for the current account session.
56+ * <p>
57+ * Attempts to retrieve the account locale from the current session. If unavailable, returns null.
58+ *
59+ * @return the account's default Locale, or null if not available
60+ */
3761 @ Override
3862 public Locale getDefaultLocale () {
3963 try {
You can’t perform that action at this time.
0 commit comments