Improve CMS web app lifecycle.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / AbstractCmsApp.java
index 2ecc658413507860381d30f238e7019a1dd29350..77cd9838305b1c14dfc2ace95a06b887a4e2b27b 100644 (file)
@@ -25,10 +25,13 @@ public abstract class AbstractCmsApp implements CmsApp {
                String themeId = getThemeId(uiName);
                if (themeId == null)
                        return null;
+               if (!themes.containsKey(themeId))
+                       throw new IllegalArgumentException("Theme " + themeId + " not found.");
                return themes.get(themeId);
        }
 
-       protected boolean allThemesAvailable() {
+       @Override
+       public boolean allThemesAvailable() {
                boolean themeMissing = false;
                uiNames: for (String uiName : getUiNames()) {
                        String themeId = getThemeId(uiName);