summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-02-03 14:10:57 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-02-03 14:10:57 +0000
commit49da447de101f61e643c10d4d89e6957afe0b802 (patch)
tree4281f49a39d6c12ace1af771ba50a7b392929132 /bkucommon/src/main/java/at/gv
parent111d7e2bb3c4fbfed8b448633d3e8c1c6e5661db (diff)
downloadmocca-49da447de101f61e643c10d4d89e6957afe0b802.tar.gz
mocca-49da447de101f61e643c10d4d89e6957afe0b802.tar.bz2
mocca-49da447de101f61e643c10d4d89e6957afe0b802.zip
Disable use of StylesheetURL by default
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1024 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv')
-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.
*/