Improve CMS web app lifecycle.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / AbstractCmsApp.java
index 98f9adfa0db822e3ea00ee4699ab211e2a7480c5..77cd9838305b1c14dfc2ace95a06b887a4e2b27b 100644 (file)
@@ -5,7 +5,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import javax.jcr.Repository;
 
@@ -19,12 +18,6 @@ public abstract class AbstractCmsApp implements CmsApp {
 
        private Repository repository;
 
-       @Override
-       public Set<String> getUiNames() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
        protected abstract String getThemeId(String uiName);
 
        @Override
@@ -32,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);