if ((templatePath==null || templatePath.equals("")) && isTemplatePathToReset) {
isTemplatePathToReset = false;
Configuration c = (Configuration)template.getTemplateTarget().getTarget().getAbstractConfigurationRoot();
Hashtable<String, String> ht = new Hashtable<String, String>();
TemplateTarget templateTarget = template.getTemplateTarget();
Target target = templateTarget.getTarget();
for (TemplateTarget templateTarget2 : target.getTemplateTargets()) {
String absoluteRootDir = templateTarget2.getAbsoluteRootDir();
if (absoluteRootDir!=null) {
ht.put(absoluteRootDir, absoluteRootDir);
}
String templateFullDir = templateTarget2.getTemplateFullDir();
if (templateFullDir!=null) {
ht.put(templateFullDir, templateFullDir);
}
}
for (String templateAssociated : target.getTemplatedirRefs()) {
for (String absoluteRootDir :target.getAbsoluteRootDirs(templateAssociated))
ht.put(absoluteRootDir, absoluteRootDir);
}
templatePath = getVelocityPath(ht,null);//getVelocityPath(ht, c.getCatalogDir());
}
return templatePath;