Updated Branches:
  refs/heads/develop 91897fd32 -> 01be878af

fixed problem with stylesheets and wrong host name


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/1b601c14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/1b601c14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/1b601c14

Branch: refs/heads/develop
Commit: 1b601c143a246ff6dd13a29642e5884a4f7b4e76
Parents: 91897fd
Author: Sebastian Schaffert <[email protected]>
Authored: Fri May 24 22:05:57 2013 +0200
Committer: Sebastian Schaffert <[email protected]>
Committed: Fri May 24 22:05:57 2013 +0200

----------------------------------------------------------------------
 .../templating/AdminTemplatingServiceImpl.java     |    3 ++-
 .../services/templating/TemplatingServiceImpl.java |    9 ++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/1b601c14/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
 
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
index 2a0279d..293b1e6 100644
--- 
a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
+++ 
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/AdminTemplatingServiceImpl.java
@@ -81,7 +81,8 @@ public class AdminTemplatingServiceImpl implements 
AdminInterfaceService {
         this.context = context;
         try {
                 //try-run to check it from the very beginning
-            templatingService.getTemplate(TEMPLATE_STRING);
+            // sschaffert: disabled the call because it requires the host name
+            //templatingService.getTemplate(TEMPLATE_STRING);
         } catch (Exception e) {
             throw new TemplatingException("Severe Error: admin template cannot 
be found: " + e.getMessage());
         }

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/1b601c14/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
 
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
index 56728cc..6942443 100644
--- 
a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
+++ 
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
@@ -31,6 +31,7 @@ import javax.enterprise.context.ApplicationScoped;
 import javax.enterprise.event.Observes;
 import javax.inject.Inject;
 
+import com.google.common.base.Preconditions;
 import org.apache.marmotta.platform.core.api.config.ConfigurationService;
 import org.apache.marmotta.platform.core.api.templating.TemplatingService;
 import org.apache.marmotta.platform.core.events.ConfigurationChangedEvent;
@@ -38,6 +39,7 @@ import 
org.apache.marmotta.platform.core.events.ConfigurationChangedEvent;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
 import freemarker.template.TemplateException;
+import org.apache.marmotta.platform.core.startup.MarmottaStartupService;
 
 /**
  * Template Service Implementation
@@ -52,13 +54,18 @@ public class TemplatingServiceImpl implements 
TemplatingService {
     @Inject
     private ConfigurationService configurationService;
 
+    @Inject
+    private MarmottaStartupService startupService;
+
        public TemplatingServiceImpl() {
                super();
                common = new HashMap<String,String>();
        }
 
        @PostConstruct
-       public void initDataModel() {        
+       public void initDataModel() {
+        Preconditions.checkState(startupService.isHostStarted());
+
         String project = 
configurationService.getStringConfiguration("kiwi.pages.project", 
DEFAULT_PROJECT);
         common.put("PROJECT", project);
         common.put("DEFAULT_STYLE", 
configurationService.getStringConfiguration("kiwi.pages.style_path", 
DEFAULT_STYLE));

Reply via email to