summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java15
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java8
2 files changed, 19 insertions, 4 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
index 05290de2..fb41c7fb 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessorImpl.java
@@ -135,6 +135,11 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
.getString(ConfigurationFactoryBean.SIGNATURE_LAYOUT_PROPERTY);
}
+ public boolean getEnableStylesheetURL() {
+ return configuration
+ .getBoolean(ConfigurationFactoryBean.USE_STYLESHEETURL_PROPERTY, false);
+ }
+
}
/**
@@ -538,7 +543,15 @@ public class HTTPBindingProcessorImpl extends AbstractBindingProcessor implement
resultContentType = HttpUtil.TXT_XML;
}
}
- templates = getTemplates(getStyleSheetUrl());
+ String stylesheetURL = getStyleSheetUrl();
+ if (configurationFacade.getEnableStylesheetURL())
+ templates = getTemplates(stylesheetURL);
+ else
+ {
+ templates = null;
+ if (stylesheetURL != null)
+ log.info("Ignoring StylesheetURL ({})", stylesheetURL);
+ }
if (templates != null) {
log.debug("Output transformation required.");
resultContentType = templates.getOutputProperties().getProperty("media-type");
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
index c3eee861..55a1c7f2 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ConfigurationFactoryBean.java
@@ -57,13 +57,15 @@ public class ConfigurationFactoryBean implements FactoryBean, ResourceLoaderAwar
protected static final Logger log = LoggerFactory.getLogger(ConfigurationFactoryBean.class);
public static final String DEFAULT_CONFIG = "/WEB-INF/conf/configuration.xml";
-
+
public static final String MOCCA_IMPLEMENTATIONNAME_PROPERTY = "ProductName";
public static final String MOCCA_IMPLEMENTATIONVERSION_PROPERTY = "ProductVersion";
-
+
public static final String SIGNATURE_LAYOUT_PROPERTY = "SignatureLayout";
-
+
+ public static final String USE_STYLESHEETURL_PROPERTY = "UseStylesheetURL";
+
/**
* The URL of the configuration file.
*/