org.barracudamvc.contrib.dbroggisch.display
Class HashMapModel

java.lang.Object
  extended byorg.barracudamvc.core.comp.AbstractTemplateModel
      extended byorg.barracudamvc.contrib.dbroggisch.display.HashMapModel
All Implemented Interfaces:
Contextual, LightweightTemplateModel, Model, TemplateModel

public class HashMapModel
extends AbstractTemplateModel
implements LightweightTemplateModel


Field Summary
protected  String modelName
           
protected  Map values
           
 
Fields inherited from class org.barracudamvc.core.comp.AbstractTemplateModel
listeners, UNDEFINED, viewContext
 
Constructor Summary
HashMapModel()
           
HashMapModel(Map mp)
           
HashMapModel(String name)
           
HashMapModel(String name, Map mp)
           
 
Method Summary
 void clear()
           
 Object getItem(String key)
          Convenience method to get an item based on the key name (extracted from the TemplateDirective).
 Object getItem(TemplateDirective td)
          get an item for a given template directive.
 Map getItems()
           
 String getName()
           
 Set keySet()
           
 void setItem(String key, Object value)
           
 void setItems(Map v)
           
 void setName(String name)
           
 
Methods inherited from class org.barracudamvc.core.comp.AbstractTemplateModel
addModelListener, fireModelChanged, getViewContext, processDirective, removeModelListener, setViewContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.barracudamvc.core.comp.TemplateModel
processDirective
 
Methods inherited from interface org.barracudamvc.core.comp.model.Model
addModelListener, removeModelListener
 
Methods inherited from interface org.barracudamvc.core.comp.Contextual
getViewContext, setViewContext
 

Field Detail

values

protected Map values

modelName

protected String modelName
Constructor Detail

HashMapModel

public HashMapModel()

HashMapModel

public HashMapModel(String name,
                    Map mp)

HashMapModel

public HashMapModel(String name)

HashMapModel

public HashMapModel(Map mp)
Method Detail

getName

public String getName()
Specified by:
getName in interface TemplateModel

getItem

public Object getItem(TemplateDirective td)
Description copied from class: AbstractTemplateModel
get an item for a given template directive. Implement this method if you want access to the full directive, not just the String key. Note that if you implement this method, AND you want to use the getItem(String key) method, then your implementation of this method must be sure to call super.getItem() in order for for the convenience method to get called.

Specified by:
getItem in interface TemplateModel
Overrides:
getItem in class AbstractTemplateModel

getItem

public Object getItem(String key)
Description copied from class: AbstractTemplateModel
Convenience method to get an item based on the key name (extracted from the TemplateDirective).

Specified by:
getItem in interface LightweightTemplateModel
Overrides:
getItem in class AbstractTemplateModel

setName

public void setName(String name)

setItem

public void setItem(String key,
                    Object value)
Specified by:
setItem in interface LightweightTemplateModel

getItems

public Map getItems()

setItems

public void setItems(Map v)

clear

public void clear()

keySet

public Set keySet()
Specified by:
keySet in interface LightweightTemplateModel


Copyright © 2004 BarracudaMVC.org All Rights Reserved.