dps.webapplication.i18n.DefaultLocale Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dps.webapplication Show documentation
Show all versions of dps.webapplication Show documentation
Common classes for webapplications
package dps.webapplication.i18n;
import dps.commons.startup.Startup;
import dps.webapplication.configuration.Settings;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
@ApplicationScoped
@Startup
public class DefaultLocale extends AbstractLocale {
@Inject
Settings applicationSettings;
@Override
AbstractLocale getParentLocale() {
return null;
}
@PostConstruct
void init() {
this.setLocale(applicationSettings.getLocale());
}
}