maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r542083 - /maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java
Date Mon, 28 May 2007 02:43:00 GMT
Author: jvanzyl
Date: Sun May 27 19:42:59 2007
New Revision: 542083

URL: http://svn.apache.org/viewvc?view=rev&rev=542083
Log:
o adding some attributes to the rendering context so I can keep track of things like velocity
filtering

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java?view=diff&rev=542083&r1=542082&r2=542083
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext.java
Sun May 27 19:42:59 2007
@@ -22,6 +22,8 @@
 import org.codehaus.plexus.util.PathTool;
 
 import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -39,6 +41,8 @@
 
     private final String relativePath;
 
+    private Map attributes;
+
     public RenderingContext( File basedir, String document )
     {
         this( basedir, document, null );
@@ -48,13 +52,15 @@
     {
         this.basedir = basedir;
 
-        this.outputName = document.substring( 0, document.lastIndexOf( "." ) ).replace( '\\',
'/' ) + ".html";
+        this.outputName = document.substring( 0, document.indexOf( "." ) ).replace( '\\',
'/' ) + ".html";
 
         this.relativePath = PathTool.getRelativePath( basedir.getPath(), new File( basedir,
document ).getPath() );
 
         this.inputName = document;
 
         this.parserId = parserId;
+
+        this.attributes = new HashMap();
     }
 
     public File getBasedir()
@@ -80,5 +86,15 @@
     public String getRelativePath()
     {
         return relativePath;
+    }
+
+    public void setAttribute( String key, String value )
+    {
+        attributes.put( key, value );
+    }
+
+    public String getAttribute( String key )
+    {
+        return (String) attributes.get( key );
     }
 }



Mime
View raw message