You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2007/11/13 13:35:31 UTC
svn commit: r594509 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
Author: jeremias
Date: Tue Nov 13 04:35:31 2007
New Revision: 594509
URL: http://svn.apache.org/viewvc?rev=594509&view=rev
Log:
Expose a method so I can easily extract the renderer configuration from outside the rendering domain (for a test tool).
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java?rev=594509&r1=594508&r2=594509&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRendererConfigurator.java Tue Nov 13 04:35:31 2007
@@ -53,14 +53,6 @@
* @return the requested configuration subtree, null if there's no configuration
*/
protected Configuration getRendererConfig(Renderer renderer) {
- Configuration cfg = userAgent.getFactory().getUserConfig();
- if (cfg == null) {
- if (log.isDebugEnabled()) {
- log.debug("userconfig is null");
- }
- return null;
- }
-
String mimeType = renderer.getMimeType();
if (mimeType == null) {
if (log.isInfoEnabled()) {
@@ -69,6 +61,24 @@
return null;
}
+ return getRendererConfig(userAgent, mimeType);
+ }
+
+ /**
+ * Returns the configuration subtree for a specific renderer.
+ * @param userAgent the user agent containing the user configuration
+ * @param mimeType the MIME type of the renderer
+ * @return the requested configuration subtree, null if there's no configuration
+ */
+ public static Configuration getRendererConfig(FOUserAgent userAgent, String mimeType) {
+ Configuration cfg = userAgent.getFactory().getUserConfig();
+ if (cfg == null) {
+ if (log.isDebugEnabled()) {
+ log.debug("userconfig is null");
+ }
+ return null;
+ }
+
Configuration userRendererConfig = null;
Configuration[] cfgs
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org