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:[EMAIL PROTECTED]">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 );
     }
 }


Reply via email to