org.apache.maven.doxia.docrenderer
Class DocumentRendererContext

java.lang.Object
  extended by org.apache.maven.doxia.docrenderer.DocumentRendererContext

public class DocumentRendererContext
extends Object

Context when processing Velocity files using a HashMap for data storage.

Since:
1.1.2
Version:
$Id: DocumentRendererContext.java 1185508 2011-10-18 06:58:50Z ltheussl $
Author:
Vincent Siveton

Constructor Summary
DocumentRendererContext()
          Default constructor.
 
Method Summary
 boolean containsKey(Object key)
          Indicates whether the specified key is in the context.
 Object get(String key)
          Gets the value corresponding to the provided key from the context.
 String getInputEncoding()
           
 Object[] getKeys()
          Get all the keys for the values in the context
 Object put(String key, Object value)
          Adds a name/value pair to the context.
 Object remove(Object key)
          Removes the value associated with the specified key from the context.
 void setInputEncoding(String inputEncoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentRendererContext

public DocumentRendererContext()
Default constructor.

Method Detail

getInputEncoding

public String getInputEncoding()
Returns:
The input encoding when processing files.

setInputEncoding

public void setInputEncoding(String inputEncoding)
Parameters:
inputEncoding - new input encoding value when processing files.

put

public Object put(String key,
                  Object value)
Adds a name/value pair to the context.

Parameters:
key - The name to key the provided value with.
value - The corresponding value.
Returns:
Object that was replaced in the the Context if applicable or null if not.

get

public Object get(String key)
Gets the value corresponding to the provided key from the context.

Parameters:
key - The name of the desired value.
Returns:
The value corresponding to the provided key or null if the key param is null.

containsKey

public boolean containsKey(Object key)
Indicates whether the specified key is in the context.

Parameters:
key - The key to look for.
Returns:
true if the key is in the context, false if not.

getKeys

public Object[] getKeys()
Get all the keys for the values in the context

Returns:
Object[] of keys in the Context.

remove

public Object remove(Object key)
Removes the value associated with the specified key from the context.

Parameters:
key - The name of the value to remove.
Returns:
The value that the key was mapped to, or null if unmapped.


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.