Class DocumentRendererContext
- java.lang.Object
-
- org.apache.maven.doxia.docrenderer.DocumentRendererContext
-
public class DocumentRendererContext extends java.lang.Object
Context when processing Velocity files using aHashMap
for data storage.- Since:
- 1.1.2
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>
context
Storage for key/value pairs.private java.lang.String
inputEncoding
-
Constructor Summary
Constructors Constructor Description DocumentRendererContext()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.Object key)
Indicates whether the specified key is in the context.java.lang.Object
get(java.lang.String key)
Gets the value corresponding to the provided key from the context.java.lang.String
getInputEncoding()
java.lang.Object[]
getKeys()
Get all the keys for the values in the contextjava.lang.Object
put(java.lang.String key, java.lang.Object value)
Adds a name/value pair to the context.java.lang.Object
remove(java.lang.Object key)
Removes the value associated with the specified key from the context.void
setInputEncoding(java.lang.String inputEncoding)
-
-
-
Method Detail
-
getInputEncoding
public java.lang.String getInputEncoding()
- Returns:
- The input encoding when processing files.
-
setInputEncoding
public void setInputEncoding(java.lang.String inputEncoding)
- Parameters:
inputEncoding
- new input encoding value when processing files.
-
put
public java.lang.Object put(java.lang.String key, java.lang.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 java.lang.Object get(java.lang.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(java.lang.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 java.lang.Object[] getKeys()
Get all the keys for the values in the context- Returns:
- Object[] of keys in the Context.
-
remove
public java.lang.Object remove(java.lang.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.
-
-