|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.ext.beans.RootMapModel
A wrapper for an arbitrary map that will expose it as a TemplateModelRoot
.
All values returned from the get(java.lang.String)
method are automatically
passed through BeansWrapper.wrap(java.lang.Object)
.
Constructor Summary | |
RootMapModel()
Creates a new model with its own internal map. |
|
RootMapModel(java.util.Map map)
Creates a new model that adds TemplateModelRoot behavior to the
passed map. |
Method Summary | |
TemplateModel |
get(java.lang.String key)
Returns BeansWrapper.wrap(map.get(key)) where map is the underlying map. |
java.util.Locale |
getLocale()
gets the locale to be used for number/date formatting (A hook for later user currently -- revusky) |
boolean |
isEmpty()
Returns map.isEmpty() where map is the underlying map. |
void |
put(java.lang.String key,
TemplateModel model)
Puts the specified template model into the map. |
void |
remove(java.lang.String key)
Removes the template model with the specified key from the map. |
void |
setLocale(java.util.Locale locale)
sets the locale to be used for number/date formatting (A hook for later user currently -- revusky) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RootMapModel()
public RootMapModel(java.util.Map map)
TemplateModelRoot
behavior to the
passed map.Method Detail |
public boolean isEmpty()
isEmpty
in interface TemplateModel
freemarker.template.TemplateModel
public TemplateModel get(java.lang.String key)
get
in interface TemplateHashModel
freemarker.template.TemplateHashModel
key
- the name by which the TemplateModel
is identified in the template.public void put(java.lang.String key, TemplateModel model)
put
in interface TemplateModelRoot
freemarker.template.TemplateModelRoot
key
- the hash key.model
- the hash value.public void remove(java.lang.String key)
remove
in interface TemplateModelRoot
freemarker.template.TemplateModelRoot
key
- the key to be removed.public void setLocale(java.util.Locale locale)
TemplateModelRoot
setLocale
in interface TemplateModelRoot
public java.util.Locale getLocale()
TemplateModelRoot
getLocale
in interface TemplateModelRoot
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |