Skip to content
Snippets Groups Projects
Commit 4a479c59 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Moving the list of displayable countries to config file

parent d689aafa
Branches
Tags
No related merge requests found
...@@ -721,14 +721,18 @@ public class UserBean { ...@@ -721,14 +721,18 @@ public class UserBean {
} }
} }
// TODO: Put in config file?
private final static String[] USER_COUNTRY_CODES = {"NO","SE","BA","LV","US"};
public List<Country> getUserCountries() public List<Country> getUserCountries()
{ {
return em.createNamedQuery("Country.findByCountryCodes") try
.setParameter("countryCodes",Arrays.asList(UserBean.USER_COUNTRY_CODES)) {
.getResultList(); return em.createNamedQuery("Country.findByCountryCodes")
.setParameter("countryCodes",Arrays.asList(System.getProperty("no.nibio.vips.logic.USER_COUNTRY_CODES").split(",")))
.getResultList();
}
catch(NullPointerException ex)
{
return new ArrayList<>();
}
} }
public List<OrganizationGroup> getOrganizationGroups(Organization organization) { public List<OrganizationGroup> getOrganizationGroups(Organization organization) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment