|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class is a simple container dedicated to the definition of mapping strategies. It is used at run time to find the mapper to be associated to each application component. It is possible to redefine a default mapper, and to define per template mappers and per instance mappers. The run time uses the following look up strategy. The search is stopped as soon as a mapper is found. the runtime first looks for a mapper explicitely associated to the component. If none can be found, it then looks for a mapper explicitely associated to the component template. If none can be found, it recursively looks for a mapper explicitely associated to super templates. If none can be found it looks for a default mapper. No null value can be returned, since this class defines a default mapper and no null value is accepted by the setDefaultMapper() method
Method Summary | |
Mapper |
getDefaultMapper()
Method getDefaultMapper returns the default mapper. |
Mapper |
getPerInstanceMapper(java.lang.String aName)
Method getPerInstanceMapper. |
Mapper |
getPerTemplateMapper(java.lang.String aName)
Method getPerTemplateMapper |
void |
setDefaultMapper(Mapper aMapper)
Method setDefaultMapper. |
void |
setPerInstanceMapper(java.lang.String aName,
Mapper aMapper)
Method setPerInstanceMger sets the mapper to be used for a given instance. |
void |
setPerTemplateMapper(java.lang.String aName,
Mapper aMapper)
Method setPerTemplateMapper sets the mapper to be used when the component is an instance of a template or one of its subtemplates. |
Method Detail |
public void setDefaultMapper(Mapper aMapper) throws KilimException
aMapper
- : a default mapper (this ctor just contains a call to setDefaultManager(aMapper). This value
cannot be null. A NullMapper should be used if no action should be performed at instanciation time.
KilimException
- : generated if the reference is null.public Mapper getDefaultMapper()
public void setPerTemplateMapper(java.lang.String aName, Mapper aMapper) throws KilimException
aName
- is name of the template.aMapper
- is the mapper to be used.
KilimException
- : generated when aName is null.public Mapper getPerTemplateMapper(java.lang.String aName) throws KilimException
aName
- : the name of the template.
KilimException
- : generated when aName is nullpublic void setPerInstanceMapper(java.lang.String aName, Mapper aMapper) throws KilimException
aName
- : the name of the component.aMapper
- : the mapper to be used
KilimException
- : generated when aName is null.public Mapper getPerInstanceMapper(java.lang.String aName) throws KilimException
aName
- : the name of the component
KilimException
- : generated when aName is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |