protected Map fieldMap;
public Service(ModelMenu modelMenu, Element serviceElement) {
super (modelMenu, serviceElement);
this.serviceNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("service-name"));
this.resultMapNameAcsr = UtilValidate.isNotEmpty(serviceElement.getAttribute("result-map-name")) ? new FlexibleMapAccessor(serviceElement.getAttribute("result-map-name")) : null;
this.autoFieldMapExdr = new FlexibleStringExpander(serviceElement.getAttribute("auto-field-map"));
List fieldMapElementList = UtilXml.childElementList(serviceElement, "field-map");
if (fieldMapElementList.size() > 0) {
this.fieldMap = new HashMap();
Iterator fieldMapElementIter = fieldMapElementList.iterator();
while (fieldMapElementIter.hasNext()) {
Element fieldMapElement = (Element) fieldMapElementIter.next();
// set the env-name for each field-name, noting that if no field-name is specified it defaults to the env-name
this.fieldMap.put(
new FlexibleMapAccessor(UtilFormatOut.checkEmpty(fieldMapElement.getAttribute("field-name"), fieldMapElement.getAttribute("env-name"))),
new FlexibleMapAccessor(fieldMapElement.getAttribute("env-name")));
}
}
}